Commit Graph

17940 Commits

Author SHA1 Message Date
Eugene Yokota 39fdf70c21 reimplement stacktrace suppression
Ref https://github.com/sbt/sbt/issues/4964
2019-08-20 12:35:13 -04:00
eugene yokota 740936e156
Merge pull request #4956 from eatkins/custom-show
Allow custom show for a scope
2019-08-19 16:37:11 -04:00
Ethan Atkins 09f4fcf94b Add test case and scaladoc 2019-08-19 11:49:09 -07:00
Ethan Atkins 8fbf1907ce Allow custom show for a scope
I am writing a plugin that uses mangled task keys that are very hard to
read. It is helpful to be able to override the show config for these
scopes so that they look reasonable in supershell and in error
reporting.
2019-08-19 11:23:43 -07:00
eugene yokota 4030a6434d
Merge pull request #4961 from eed3si9n/wip/bump
bump modules
2019-08-19 12:55:06 -04:00
Eugene Yokota fcf7c5955e remove neo-sbt-scalafmt test
The test fails because the plugin is using reflection to access a private class, and we changed it - https://github.com/lucidsoftware/neo-sbt-scalafmt/issues/80
2019-08-19 03:37:33 -04:00
Eugene Yokota 01e7b5d191 ScalaTest 3.0.8 2019-08-19 02:34:07 -04:00
Eugene Yokota 6d54ad3745 launcher 1.1.2 2019-08-19 02:31:03 -04:00
Eugene Yokota 13b110faef io 1.3.0-M16, util 1.3.0-M9, lm 1.3.0-M6, zinc 1.3.0-M9 2019-08-19 02:27:52 -04:00
eugene yokota d4824a53ae
Merge pull request #210 from eed3si9n/wip/build
publish for 2.13
2019-08-19 01:01:59 -04:00
eugene yokota c9ca41a11e
Merge pull request #315 from eed3si9n/wip/bump
bump modules
2019-08-19 00:05:01 -04:00
Eugene Yokota 153ac7161d bump modules 2019-08-18 23:56:20 -04:00
Eugene Yokota 5fcb100d6f publish for 2.13
Fixes #201
https://repo1.maven.org/maven2/org/scala-sbt/util-cache_2.13/
2019-08-18 23:20:43 -04:00
eugene yokota edfe9c6c63
Merge pull request #314 from eed3si9n/wip/http
Fix validatePatterns
2019-08-18 00:27:22 -04:00
Eugene Yokota cc6147c8d2 Remove lmCommonTest 2019-08-17 23:55:58 -04:00
Eugene Yokota a9873101bf Fix validatePatterns
https://github.com/sbt/librarymanagement/pull/312 had a bug.
2019-08-17 22:17:58 -04:00
Scala Steward d61ee8d6c2 Update sbt-coursier, sbt-shading to 2.0.0-RC3-3 (#124) 2019-08-16 10:02:05 +02:00
eugene yokota 6f74650712
Merge pull request #4950 from eed3si9n/wip/coursier
use Relaxed reconciliation strategy by default (take 2)
2019-08-15 23:37:08 -04:00
eugene yokota 94b651252d
Merge pull request #4951 from intracer/develop
add .idea to .gitignore
2019-08-15 22:11:11 -04:00
Ethan Atkins dbd4fb115b
Merge pull request #4953 from eatkins/scripted-fixes
Scripted fixes
2019-08-15 19:04:06 -07:00
Ethan Atkins 4c6df99b6a Run scripted watch tests with launcher on windows
The sbt-coursier plugin now uses a shaded jansi and it seems to cause
problems with scripted tests if they aren't run using the launcher. On
my vm, all of the watch tests succeeded after this change and they all
crashed the jvm before.
2019-08-15 17:33:48 -07:00
Ethan Atkins e621ebe678 Ensure correct scripted plugin implementation exists
When running the scripted tests on my vm, I noticed that one of the
watch tests warned that the InstrumentScripted.scala file had changed
after the project had initialized. The test then hung and I had to kill
it. To try and prevent this from happening, I moved the creation of the
plugin file to right before the call to ";reload;setUpScripted".
2019-08-15 17:33:48 -07:00
ilya 5fb36df6fe add .idea to .gitignore 2019-08-16 00:57:05 +03:00
Eugene Yokota 35bc79063c lm-coursier-shaded 2.0.0-RC3-3 2019-08-15 15:40:43 -04:00
Eugene Yokota 777cc39fcf Fix inter-project dependencies
Tracking https://github.com/coursier/sbt-coursier/pull/101
2019-08-15 15:40:43 -04:00
Eugene Yokota 46e92949ed use Relaxed reconciliation strategy by default
Fixes #4720
Ref https://github.com/coursier/coursier/pull/1293
Ref https://github.com/coursier/sbt-coursier/pull/112
2019-08-15 15:40:43 -04:00
Eugene Yokota a22e4889f4 reproduce "Conflicting dependencies"
Ref #4720
2019-08-15 15:40:43 -04:00
eugene yokota 3b0171a50a
Merge pull request #4949 from eatkins/changed-binaries
Update ExternalHooks to look up changed binaries
2019-08-15 15:24:24 -04:00
Ethan Atkins 9c7acdb713 Force invalidate dependency changes
After adding the automatic lookup to external hooks for missing binary
jars, the scripted test dependency-management/invalidate-internal
started failing. This was because the previous analysis contained a jar
dependency that still existed on disk but was no longer a part of the
dependency classpath. Fundamentally the problem is that the zinc
compile analysis is not tightly coupled with the sbt build state.

To fix this, we can cache the dependency classpath file stamps in the
same way that we cache the input file stamps in external hooks and
manually diff them at the sbt level. We then force updates regardless of
the difference between the zinc state and the sbt state.
2019-08-15 11:31:24 -07:00
Ethan Atkins 32a6d0d5d7 Update ExternalHooks to look up changed binaries
It was reported that in community builds, sometimes there was
spurious over-compilation due to invalidation of the scala library jar
(https://github.com/sbt/sbt/issues/4948). The reason for this was that
the external hooks prefills the managed cache with all of the time
stamps for the project dependencies but was not looking up any jars that
weren't in the cache. I suspect I did this because I didn't realize that
zinc also includes its own classpath in the binaries which is not
a part of the dependencyClasspath. The fix is to just add the jar to the
cache if it doesn't already exist by switching to getOrElseUpdate from
get.

I followed the steps in #4948 and published a version of sbt locally
with this change and the spurious re-builds stopped.
2019-08-15 10:34:05 -07:00
Alexandre Archambault 43d24c9609
Remove unused methods in lmcoursier.credentials (#123) 2019-08-15 17:33:52 +02:00
Alexandre Archambault 6bc9c7c01b
Merge pull request #121 from alexarchambault/develop
Switch to coursier 2.0.0-RC3-3, add versionReconciliation key
2019-08-15 14:46:29 +02:00
eugene yokota 9e1d4295e7
Merge pull request #313 from eed3si9n/wip/eviction
improve "X is evicted completely"
2019-08-14 12:40:50 -04:00
Eugene Yokota 8c16fd0edf switch to using scala-verify 2019-08-14 12:32:49 -04:00
Alexandre Archambault f97b0860d3 Less verbose output during shading 2019-08-14 17:28:30 +02:00
Alexandre Archambault 064978ac42 Enable extra strict conflict manager test 2019-08-14 17:28:30 +02:00
Alexandre Archambault 59ec5d2b95 Add strict reconciliation, and versionReconciliation key 2019-08-14 17:28:30 +02:00
Alexandre Archambault ecba0288a6 Switch to coursier 2.0.0-RC3-3 2019-08-14 17:28:22 +02:00
Eugene Yokota 8fee1e2666 improve "X is evicted completely"
Fixes https://github.com/sbt/sbt/issues/4946

1. This rewords "evicted completely" to "evicted for all versions"
2. Skips transitive and complete evictions (eviction that has no winner version)
2019-08-13 23:35:50 -04:00
eugene yokota f58fa46c8c
Merge pull request #312 from eed3si9n/wip/http
Deprecate HTTP resolvers
2019-08-13 22:59:39 -04:00
eugene yokota ca776cf3f8
Merge pull request #208 from jroper/file-info-hash-byte-array
Use byte arrays instead of lists of bytes in FileInfo
2019-08-13 08:03:28 -04:00
Scala Steward a1f3d24bd9 Update sbt-coursier, sbt-shading to 2.0.0-RC3-2 (#117) 2019-08-13 13:38:22 +02:00
Alexandre Archambault 7bc0078cb9
Merge pull request #118 from alexarchambault/shaded-jar-check
Check that lmcoursier is the only remaining namespace in lm-coursier-shaded JAR
2019-08-12 08:39:37 +02:00
James Roper 50b2ea6f83 Use byte arrays instead of lists of bytes in FileInfo
Fixes #206
2019-08-12 15:16:48 +10:00
eugene yokota c124bc1dcd
Merge pull request #4927 from eatkins/file-report
File report
2019-08-09 22:06:19 -04:00
Ethan Atkins 7c483909af Invalidate unmanagedFileStampCache in allOutputFiles
In the code formatting use case, the formatting task may modify the
source files in place. If the formatting task uses the nio
inputFileStamps, then it would fill the in-memory cache of source paths
to file stamps. This would cause compile to see the pre-formatted
stamps. To fix this, we can invalidate the file cache entries for the
outputs of a task. This will cause the side-effect of some extra io
because the hashes may be computed three times: once for the format
inputs, once for the format outputs and once for the compile inputs. I
think most users would understand that adding auto-formatting would
potentially slowdown compilation.

To really prove this out, I implemented a poor man's scalafmt plugin in
a scripted test. It is fully incremental. Even in the case when some
files cannot be formatted it will update all of the files that can be
formatted and not re-format them until they change.
2019-08-09 13:18:29 -07:00
Ethan Atkins 3f026972d5 Bump io to 1.3.0-M15
This fixes a bug with IO.delete on windows.
2019-08-09 12:18:22 -07:00
Ethan Atkins 440a4e2b51 Bump io version to 1.3.0-M14
This adds the PathFilter apis.
2019-08-09 12:18:22 -07:00
Ethan Atkins 6d482eb166 Set scope for fileTreeView
It makes sense to add a scope for the `fileTreeView` key where it is
available. At the moment, there is only one `fileTreeView`
implementation but, if that changes down the road, these tasks will
automatically inherit the correct view.
2019-08-09 12:18:22 -07:00
Ethan Atkins 6700d5f77a Add nio path filter settings
It makes sense for the new glob/nio based apis that we provide first
class support for filtering the results. Because it isn't possible to
scope a task within a task within a task, i.e.
`compile / fileInputs / includePathFilter`, I had to add four new
filter settings of type `PathFilter`:

fileInputIncludeFilter :== AllPassFilter.toNio,
fileInputExcludeFilter :== DirectoryFilter.toNio || HiddenFileFilter,
fileOutputIncludeFilter :== AllPassFilter.toNio,
fileOutputExcludeFilter :== NothingFilter.toNio,

Before I was effectively hard-coding the filter: RegularFileFilter &&
!HiddenFileFilter in the inputFileStamps and allInputFiles tasks. These
remain the defaults, as seen in the fileInputExcludeFilter definition
above, but can be overridden by the user.

It makes sense to exclude directories and hidden files for the input
files, but it doesn't necessarily make sense to apply any output filters
by default. For symmetry, it makes sense to have them, but they are
unlikely to be used often.

Apart from adding and defining the default values for these keys, the
only other changes I had to make was to remove the hard-coded filters
from the allInputFiles and inputFileStamps tasks and also add the
filtering to the allOutputFiles task. Because we don't automatically
calculate the FileAttributes for the output files, I added logic for
bypassing the path filter application if the PathFilter is effectively
AllPass, which is the case for the default values because:
AllPassFilter.toNio == AllPass
NothingFilter.toNio == NoPass
AllPass && !NoPass == AllPass && AllPass == AllPass
2019-08-09 12:18:22 -07:00