You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It happens sometimes that a developer edits a file, saves it, and then quickly undos the change followed by another save before building. jbuilder will perceive the file as changed regardless of contents, because it apparently just uses timestamps to detect changes. This problem can also happen if, for example, an intermediate file is equivalent to the previous version, maybe because a change didn't affect code generation.
I think it would be better to hash all input files and (intermediate) targets to reduce build times in these cases. Other build tools support this, too, e.g. ocamlbuild, and probably omake. Hashing is usually very much cheaper than any compilation step. An unchanged timestamp should, of course, be interpreted as "no change" to avoid hashing all files all the time.
The text was updated successfully, but these errors were encountered:
There a re a couple of things to sort to make this work:
change the way aliases are handled; currently creating an alias essentially does touch <some-file>. They would now have to produce a file whose contents reflects the contents of the dependencies of the alias
decide how to checksum files. We can't rely on external system tools as this is not portable, and calling Digest.file synchronously for every file is likely to be noticeable on large trees. We could create a auxiliary tool for this
I'm also thinking of adding a bridge with jenga so that we can use jenga with jbuilder projects. This will solve this issue as jenga already handles all this properly.
It happens sometimes that a developer edits a file, saves it, and then quickly undos the change followed by another save before building.
jbuilder
will perceive the file as changed regardless of contents, because it apparently just uses timestamps to detect changes. This problem can also happen if, for example, an intermediate file is equivalent to the previous version, maybe because a change didn't affect code generation.I think it would be better to hash all input files and (intermediate) targets to reduce build times in these cases. Other build tools support this, too, e.g.
ocamlbuild
, and probablyomake
. Hashing is usually very much cheaper than any compilation step. An unchanged timestamp should, of course, be interpreted as "no change" to avoid hashing all files all the time.The text was updated successfully, but these errors were encountered: