Skip to content

Conversation

eed3si9n
Copy link
Member

@eed3si9n eed3si9n commented Dec 16, 2017

This is a continuation of #3789

Use the new native file modification timestamps, which return times with full millisecond precisions whenever possible. Re-enables the tests run/error and tests/fork-parallel.
Depends on sbt/zinc#463
See: sbt/io#92

Fixes #3543

This reverts commit 4ac231d.
# > test
# -> check
> test
-> check
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fork-parallel failed 3 times in a row on Travis:

[error] x tests / fork-parallel 
[error]  Cause of test exception: {line 2}  Command succeeded but failure was expected

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop the relevant restore commit, and drop "Fixes #3545" from the PR desc, and merge.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea. That what I was thinking too.

Antonio Cunei and others added 7 commits December 16, 2017 12:22
In Eval there is a calculation of hashes by scanning the elements
of classpath, and getting the last modification time of each
directory. When lastModified() was in use, non-existent elements
would return 0L, but getModifiedTime() will throw an exception
instead (like getLastModifiedTime(), incidentally).
So, we catch the FileNotFoundException and return 0L now as well.
It turns out the code in Sync.scala activiely tries to transfer
the invalid modifed time of non-existent files in the source
directory over the time of the target file, which may or may
not exist. In case it exists, the modification time is set
to January 1, 1970. This is arguably a bug in Sync, which
should be adjusted to better handle mappings with source
files that do not exist. For now, however, we preserve the
current behavior, using the deprecated copyLastModified().
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.

2 participants