Commit Graph

16 Commits

Author SHA1 Message Date
Antonio Cunei 0a1bd5a3b2 Change modifiedTime definitions 2017-12-22 00:13:27 +01:00
Antonio Cunei 8ba68eedfd Revert *ModifiedTime() calls to *lastModified*() calls
There are just too many instances in which sbt's code relies on
the `lastModified`/`setLastModified` semantics, so instead of moving
to `get`/`setModifiedTime`, we use new IO calls that offer the new
timestamp precision, but retain the old semantics.
2017-12-22 00:13:27 +01:00
Antonio Cunei d2338ff287 Removed a couple more direct imports of getModifiedTime() 2017-12-15 17:23:39 +01:00
Dale Wijnand 13a8d53369
Use IO.getModified over importing the method
.. and make getModifiedTimeOrZero private.
2017-12-13 15:47:15 +00:00
Antonio Cunei cd4346c5d7 Allow FileInfo for non-existent files with the new timestamps
FileInfo is used to wrap information like last modified time on
files that may or may not exist. Arguably, that does not make
much sense: the non-existent files should not lead to modification
file information, hashes, and a persistent serialized version of
the resulting meaningless information. However, considering that
the FileInfo information is serialized and saved, it is necessary
to preserve compatibility at this stage. Therefore the modification
time is explicitly set to zero for those files that do not exist
when each FileInfo is built.
2017-12-08 23:50:40 +01:00
Antonio Cunei d03dfb3981 Moved Milli._ to IO. 2017-12-06 20:29:41 +01:00
Antonio Cunei ccf149e8bf Convert lastModified() calls to sbt.io.Milli.getModifiedTime() 2017-12-06 20:29:41 +01:00
Dale Wijnand d31b9c5093
Add, configure & enable Scalafmt 2017-08-10 11:44:24 +01:00
eugene yokota 64f1331408 Merge pull request #93 from eed3si9n/wip/cache
switch to using sjson-new-murmurhash for cache key
2017-07-15 13:16:50 -04:00
Eugene Yokota 8b5210f84d Bump to latest Contraband 2017-07-15 10:36:03 -04:00
Eugene Yokota b0b9dc5e0f switch to using sjson-new-murmurhash
The input validation for caching currently relies on having a stack of `scala.math.Equiv`, which is questionable since it can fallback to universal equality.

This is likely related to the intermittent caching behavior we are seeing in https://github.com/sbt/sbt/issues/3226
2017-07-14 12:27:06 -04:00
Dale Wijnand f8d67d6837
Move HListFormats to collection to drop cache->collection dep
Looks like the reason that util-cache depended on util-collection was to
define the sjson-new formats (HListFormats) for util-collection's HList.
Given that util-collection already depends on sjsonnew, HListFormats can
also be defined in util-collection.

All that was left then was (a) HListFormatSpec requires
sjsonnewScalaJson, so that was added in test scope, and (b) HListFormats
had to be dropped from sbt.util.CacheImplicits - HListFormats will have
to be imported and/or mixed-in where required downstream. For importing
convenience I defined a companion object.
2017-07-03 12:04:44 +01:00
Eugene Yokota b912a58125 Fix tests 2017-07-01 08:00:19 -04:00
Eugene Yokota 4e01a35917 Contraband update 2017-07-01 07:47:19 -04:00
Eugene Yokota 32d6bf38cf send TraceEvent on crash
Fixes sbt/sbt#3234
2017-06-28 02:18:03 -04:00
Eugene Yokota f48848e5d4 Adds overrides for File-based caching
sbt/util#45 implemented caching using sjson-new. Now many of the functions take `CacheStore` that abstracts the caching ability.

sbt/sbt#3109 demonstrates that setting up CacheStore requires boilerplate involving concepts introduced in sbt 1.

This change adds back overrides using File by making assumption that majority of the time we would want standard JSON converter.
2017-04-17 10:24:54 -04:00