Commit Graph

83 Commits

Author SHA1 Message Date
Akhtyam Sakaev 3ea9f8a71b
fix typo 2019-06-06 08:05:16 +03:00
Ethan Atkins 2deac62b00 Bump io
The newest version of io repackages a number of classes into the
sbt.nio.* packages. It also changes some of the semantics of glob
related apis. This commit updates all of the usages of the updated apis
within sbt but should have no functional difference.
2019-05-02 14:33:01 -07:00
Eugene Yokota 1e157b991a apply formatting 2019-04-20 03:23:54 -04:00
Jason Zaugg 3cbbe93c6e Avoid NPE on Run.<init> 2019-02-22 10:26:10 +10:00
Ethan Atkins 6725b39a84 Bump io to 1.3.0-M3
I had to turn off -Xfatal-warnings in commandProj because after updating
io, commandProj depends on the deprecated EventMonitor class. In #4335,
I stop using EventMonitor, but deprecate the Watched class which is both
defined and used (as an unused attribute key) in commandProj. I think we
can probably get rid of Watched in 1.4.x and certainly in a hypothetical
2.x, so hopefully we can restore -Xfatal-warnings sooner than later.

I also had to replace uses of IO.classLocationFile with
IO.classLocationPath to avoid compilation failures due to
-Xfatal-warnings.
2018-10-08 13:59:34 -07:00
Eugene Yokota 1465604f8c Demote "Done updating." log to debug level 2018-10-02 08:25:28 -04:00
Eugene Yokota 3e1dac5161 -Xfatal-warnings in most subprojects 2018-09-18 11:47:55 -04:00
eugene yokota 8af7a5acae
Merge pull request #4358 from eed3si9n/wip/license
Apache License 2.0
2018-09-14 11:11:17 -04:00
Eugene Yokota 4ff4f6e45e Update header 2018-09-14 04:53:36 -04:00
Eugene Yokota f3424e265c Formatting 2018-09-14 00:59:01 -04:00
Nepomuk Seiler 5989d07249 FIX #1972 fix lost package mappings with identical source file 2018-08-22 18:05:49 +02:00
xuwei-k ae1fdff968 use SAM type 2018-07-09 13:06:34 +09:00
Eugene Yokota 86427c7ce7 Merge branch '1.1.x' into wip/merge-1.1.x 2018-06-12 23:33:47 -04:00
dadarakt 39cac14ea7 Adapted syntax to match example 2018-05-15 14:25:49 +02:00
dadarakt e83013d3c8 Using outputChanged to track the change of the jar file instead of unit 2018-05-15 14:09:27 +02:00
Eugene Yokota 28e90ea09b Merge branch '1.1.x' into wip/merge-1.1.x 2018-04-29 14:31:30 -04:00
Eugene Yokota a798c4adff Re-fix console and JLine bug
Fixes #3482 take 3

There are two bugs related REPL and JLine.
1. JLine getting disabled (up arrow not working) on the second run of `console` task.
2. Typed characters not showing up even on the `console` task.

The first issue was fixed by #4054 which added `t.init`. When I noticed the second problem, I fixed it in #4082 (adds `t.restore`) but undid the first fix. This attempts to fix both the issues.
2018-04-25 16:55:26 -04:00
Dale Wijnand ebe5540226
Reformat some corner cases 2018-04-24 16:12:18 +01:00
Dale Wijnand 8f4b8abb7b
Run scalafmt & test:scalafmt 2018-04-24 16:12:10 +01:00
Eugene Yokota 8ed796fb25 Re-fixing console and JLine
Fixes #3482 take 2

I thought I tested #4054 using a local build, but when I ran 1.1.3, `console` did not display anything that I typed.
Switching to `usingTerminal` which calls `terminal.restore` similar to what I had in 1.1.1 fixes `console`.
2018-04-09 00:11:17 -04:00
Eugene Yokota 8781c16cbb bump IO and Zinc 2018-04-06 16:30:33 -04:00
Eugene Yokota ad3692b2df Use NIO Files.getLastModifiedTime for hashing 2018-04-05 04:22:16 -04:00
Eugene Yokota 04d6a8b44c perf: optimize hash for build
This hot path was discovered by retronym using FlameGraph.
This removes intermediate creation of Array.

`filesModifiedBytes` in particular was bad as it was going through all `*.class` files, each generating an Array. This replaces that with `fileModifiedHash` that accepts `MessageDigest`.

According to the flamegraph, evalCommon footprint reduced from 4.5% to 3.6%.
Using `time sbt reload reload reload exit`, the median reduced from 41.450s to 39.467s.
2018-04-05 03:26:02 -04:00
Eugene Yokota 88f50ce35d Fix console, JLine issue
Fixes #3482
2018-03-30 23:09:01 -04:00
Dale Wijnand 92ed849eaa
Remove import-excluding Predef.conforms
As of Scala 2.11 Predef.conforms isn't implicit anymore (and it's
deprecated), so import-excluding doesn't avoid the implicit (the
implicit version is now Predef.$conforms). Also in Scala 2.13
Predef.conforms has been removed.
2018-01-23 17:14:15 +00:00
Dale Wijnand 113656aed1
Remove compile warnings 2018-01-16 11:17:01 +00:00
Dale Wijnand a0b27d29b7
Merge pull request #3854 from sbt/1.1.x
1.1.x
2018-01-08 11:16:26 +00:00
Antonio Cunei 94e36a14c8 Change modifiedTime definitions 2017-12-22 01:55:37 +01:00
Antonio Cunei ebff7919e9 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 01:55:37 +01:00
eugene yokota 34d311f9ce
Merge pull request #3807 from dwijnand/remove-warnings
Remove warnings
2017-12-19 13:18:59 -05:00
Eugene Yokota 40b86ae412 bump modules and plugins 2017-12-16 12:22:42 -05:00
Dale Wijnand ae99922101 Use IO.getModified over importing the method 2017-12-16 12:22:42 -05:00
Antonio Cunei 46d6b01f79 Use copyLastModified() in Sync.scala
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().
2017-12-16 12:22:42 -05:00
Antonio Cunei 295bcff851 Hash calculation may throw exception w/ getModifiedTime(); fix
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.
2017-12-16 12:22:42 -05:00
Antonio Cunei 2129f8ceb5 Use IO.copyModifiedTime() in place of IO.copyLastModified() 2017-12-16 12:22:42 -05:00
Antonio Cunei 8c7b781d3f Moved Milli._ to IO. 2017-12-16 12:22:42 -05:00
Antonio Cunei 699b53262a Convert lastModified() to sbt.io.Milli.getModifiedTime(), more precise 2017-12-16 12:22:42 -05:00
Dale Wijnand f50260218d
Remove all warnings from actionsProj 2017-12-14 13:19:23 +00:00
Eugene Yokota a6eb1260c8 Merge branch '1.0.x' into wip/bump 2017-11-29 16:45:02 -05:00
Antonio Cunei b19bd33dc0 Missing import 2017-10-26 02:30:23 +02:00
Antonio Cunei 53ea3596ec Interim fix for #3583, for 1.0.3
In 0.13.x, zinc would discover only top-level objects and classes
containing tests to the test framework. In 1.x, however, zinc can
discover also nested objects and classes; that causes the "name"
of a ClassLike to no longer be usable for reflection.

This change filters out nested objects/classes from the list,
restoring compatibility with 0.13. A zinc extension of ClassLike
will probably be introduced in 1.1 or 1.2, in order to provide
the test framework with enough information to deal with nested
classes.

This patch unblocks https://github.com/sbt/sbt-standalone-build/issues/15
2017-10-26 02:30:23 +02:00
Simon Schäfer 93e08b7ee7 Fix warnings about unused pattern vars in various projects 2017-10-19 13:07:24 +02:00
Dale Wijnand a41727fb17
Add, configure & enforce file headers 2017-10-05 09:03:40 +01:00
Dale Wijnand 805b76f3d4
Add back, re-configure & re-enable Scalafmt 2017-08-10 16:35:23 +01:00
Eugene Yokota f0ac6ae11c Adjust to upstream changes 2017-07-16 00:51:49 -04:00
Martin Duhem 347914191a Adapt to new library management API 2017-07-15 18:09:40 -04:00
Dale Wijnand 9494967e05
Upgrade util/lm/zinc & config build for util modules
Welcome back home!
2017-07-07 12:11:59 +01:00
Eugene Yokota efa3b1d340
Bump to latest io, scalajson, sjsonnew, contraband, util, lm, zinc 2017-07-06 11:05:24 +01:00
Eugene Yokota 03c9b648fb Adjust to Zinc and lm changes 2017-05-30 00:59:43 -04:00
Eugene Yokota cfbff070e0 Ignore ZipException in cache
Fixes #3050
2017-05-26 21:02:41 -04:00