Giter VIP home page Giter VIP logo

temporize's People

Contributors

dependabot[bot] avatar h34tnet avatar

Stargazers

 avatar

Watchers

 avatar  avatar

temporize's Issues

UTF-8 encoding problem

Umlauts in the source code are \u**-escaped by the java.commons.text StringEscape utils.

The template "äöü" creates the following write code:

w.write("\u00C3\u00A4\u00C3\u00B6\u00C3\u00BC");

This then gets written as "äöü"

Tag and remove old compiled template java files

If a template gets removed or renamed, the leftover class stays and has to be manually removed.

Proposed resolution:

  • Tag compiled templates with a tag that includes the path of the source file
  • On compile, find all compiled templates in the output directory that refer to a source file that doesn't exist anymore
  • Delete those

Note: it's not necessary to delete all template files and i don't want to just delete all java files in the output directory for security reasons (misconfiguration might make it delete more than necessary).

Write templates to file only after all compilation steps went through

Currently, all files are written immediately after being compiled.

So if there are 3 Templates A, B and C, and compilation of B throws an Exception, A has already been written to disk, while B and C haven't, making the state of the compiled templates inconsistent.

Solution: gather all templates in memory before writing them down as a last step.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.