Skip to content

Try to help incremental compilation be faster#97

Merged
kaj merged 3 commits intomasterfrom
restructure-template-utils
Nov 14, 2020
Merged

Try to help incremental compilation be faster#97
kaj merged 3 commits intomasterfrom
restructure-template-utils

Conversation

@kaj
Copy link
Owner

@kaj kaj commented Nov 14, 2020

Try to make incremental compilation faster by writing generated source files only when their contents actually changes.

The code that is made available in the templates module of projects using ructe is moved into the templates module of ructe. Also, the files containing that code is now handled as proper submodules, both in ructe itself and in generated code.

kaj added 2 commits November 14, 2020 12:33
The code that is made available in the templates module of projects
using ructe is not moved into the templates module of ructe.

Also, the files containg that code is now handled as proper
submodules, both ructe and in generated code.
When generating source code, write to an internal buffer first, and
then write it to file only if the file does not alreay exist or the
contents differ.  I hope this can help cargo and rustc not to bother
with unmodified sources, making incremental compilation of projects
that use ructe faster.
@kaj kaj changed the title Move files for less confusing source Try to help incremental compilation be faster Nov 14, 2020
@kaj kaj merged commit c90ba25 into master Nov 14, 2020
@kaj kaj deleted the restructure-template-utils branch November 14, 2020 13:30
kaj added a commit that referenced this pull request Nov 15, 2020
* Try to improve incremental compile times of projects using ructe by
  only writing fils if their contents actually changed. Also some code
  cleanup. PR #97.
* Update ructe itself to use edition 2018 (it is still useable for
  projects using both editios).  PR #98.
* Fix `StaticFiles::add_files_as` for empty `to` argument and add some
  more documentation for it.  Fixes issue #96.
* Update optional rsass dependency to 0.16.0.
* Add optional support for tide 0.14 and 0.15.
* Update gotham to 0.5 and axtix-web to 3.2 in examples.

Tested with rustc 1.47.0 (18bf6b4f0 2020-10-07),
1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16),
1.48.0-beta.8 (121901459 2020-11-08), and
1.50.0-nightly (98d66340d 2020-11-14)
kaj added a commit that referenced this pull request Nov 15, 2020
* Try to improve incremental compile times of projects using ructe by
  only writing fils if their contents actually changed. Also some code
  cleanup. PR #97.
* Update ructe itself to use edition 2018 (it is still useable for
  projects using both editios).  PR #98.
* Fix `StaticFiles::add_files_as` for empty `to` argument and add some
  more documentation for it.  Fixes issue #96.
* Update optional rsass dependency to 0.16.0.
* Add optional support for tide 0.14 and 0.15.
* Update gotham to 0.5 and axtix-web to 3.2 in examples.

Tested with rustc 1.47.0 (18bf6b4f0 2020-10-07),
1.42.0 (b8cedc004 2020-03-09), 1.40.0 (73528e339 2019-12-16),
1.48.0-beta.8 (121901459 2020-11-08), and
1.50.0-nightly (98d66340d 2020-11-14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant