Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache dependency mtimes and check equality, not mtime(dep) <= mtime(cache) #12559

Merged
merged 1 commit into from
Aug 11, 2015

Conversation

stevengj
Copy link
Member

As discussed in #12458, it is a good idea to store the timestamp of the dependency files in the .ji file, so that we can check staleness by comparing that the dependency timestamp is equal to the cached value, not just that the dependency is older than the cachefile (ala make). This has two advantages:

  • Correctness: if you replace a dependency with an older version of the file, you still want to recompile.
  • Clock-skew: this should greatly reduce the problems arising from clock-skew if you are manually copying files back and forth over the network (cc @tkelman).

Of course, we may still want to use a hash or checksum at some point, but this is a free-of-cost thing that we can do now.

@stevengj stevengj added the compiler:precompilation Precompilation of modules label Aug 11, 2015
@pao
Copy link
Member

pao commented Aug 11, 2015

Seems perfectly cromulent.

@ScottPJones
Copy link
Contributor

👍 (still wanting to see simple hashing at some point though 😀)

@tkelman
Copy link
Contributor

tkelman commented Aug 11, 2015

Cool, I think this'll help. Will test it under the setup where I was hitting trouble and let you know.

stevengj added a commit that referenced this pull request Aug 11, 2015
cache dependency mtimes and check equality, not mtime(dep) <= mtime(cache)
@stevengj stevengj merged commit f9a70ac into JuliaLang:master Aug 11, 2015
@stevengj stevengj deleted the cache_mtime branch August 11, 2015 16:49
@tkelman
Copy link
Contributor

tkelman commented Aug 11, 2015

So far so good in initial tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants