Commit Graph

10242 Commits

Author SHA1 Message Date
eugene yokota a2563f0088
Merge pull request #5447 from eed3si9n/wip/ordering
Make bare setting loading order alphabetical
2020-02-26 16:25:24 -05:00
Alex Zolotko bbadaa5985
Merge branch 'develop' into handle-interrupted-exception-in-completion-service-task 2020-02-25 13:09:52 +01:00
Alex Zolotko 7a1a524b4e Treat InterruptedException in CompletionService as task being cancelled 2020-02-25 11:58:09 +01:00
Eugene Yokota 4b847b148f Make bare setting loading order alphabetical
Fixes https://github.com/sbt/sbt/issues/2697
Ref https://twitter.com/not_xuwei_k/status/1230140477959286848

Note that this is could potentially break an existing build that was relying on previous behavior, which seem to return `build.sbt` at the end if you have `a.sbt`, `b.sbt`, `c.sbt`, and `build.sbt`.
2020-02-24 18:16:01 -05:00
eugene yokota 16e14f1757
Merge pull request #5446 from azolotko/5226-use-backgound-job-service-pool-for-job-onstop
Prevent RejectedExecutionException during BackgroundRunnable.cleanup
2020-02-24 17:25:15 -05:00
Eugene Yokota b97de940a5 Make val loading order top-to-bottom
Fixes #2232

Within `build.sbt` this makes sure that definitions are ordered from top to bottom.
This matters when multiple subprojects refer to the same setting (probably not a good practice).
2020-02-22 04:45:34 -05:00
Alex Zolotko 92b2eaadf8 Prevent RejectedExecutionException during BackgroundRunnable.cleanup 2020-02-21 10:45:51 +01:00
eugene yokota 523795e204
Merge pull request #5440 from eed3si9n/wip/getsetting
Add getSetting to UpperStateOps
2020-02-18 13:52:29 -05:00
eugene yokota 36091bcd24
Merge pull request #5436 from dwijnand/document-parts-of-AList-and-TupleSyntax
Document parts of AList & components of TupleSyntax
2020-02-18 12:58:53 -05:00
Dale Wijnand 23702b6432 Add toTaskable to Init/+Task, for tuple syntax 2020-02-17 12:22:53 +00:00
Dale Wijnand 722022ae97 Add conversions from Init/+Task to Taskable 2020-02-17 12:22:53 +00:00
Dale Wijnand fdfdd1ca47 Extract Taskable from ScopedTaskable 2020-02-17 12:22:53 +00:00
Dale Wijnand 2608f8ade6 Document parts of AList & components of TupleSyntax
Also, extract the AList.SplitK type lambda helper for call-site reuse.
2020-02-17 07:15:37 +00:00
Eugene Yokota 75365e13d1 Add getSetting to UpperStateOps
This returns Option[A].
2020-02-16 22:32:06 -05:00
eugene yokota a7d76d357c
Merge pull request #5207 from eed3si9n/wip/task
make sbt server more extensible
2020-02-16 00:48:17 -05:00
eugene yokota 576f738de7
Merge pull request #5437 from dwijnand/add-missing-AList-type-alias
Add missing AList type alias to sbt.Import
2020-02-16 00:42:39 -05:00
eugene yokota c4900b1152
Merge pull request #5438 from eed3si9n/wip/comment-out
Comment out failing test
2020-02-16 00:05:43 -05:00
Eugene Yokota 7eed7dd065 Comment out failing test 2020-02-15 23:20:16 -05:00
Eugene Yokota 25a79d0ac6 Add State extension
Fixes https://github.com/sbt/sbt/issues/3112

This unpacks Extracted as State's extension methods.

In addition this provides a way of responding via LSP.
2020-02-15 19:32:19 -05:00
eugene yokota 15038fb23e
Merge pull request #5434 from dwijnand/update/sbt-1.3.8
Update sbt to 1.3.8
2020-02-15 12:39:03 -05:00
Dale Wijnand e5f4bed181 Add missing AList type alias to sbt.Import 2020-02-15 17:18:04 +00:00
Dale Wijnand c5b684984c Tweak Def.displayRelative
My driving use case was LocalProject: it should display the same as a
fully resolved ProjectRef.  Similarly ThisBuild should display as such.
2020-02-15 17:17:03 +00:00
Dale Wijnand 4635af182a Add some tests around Def.displayRelative2 2020-02-15 17:17:03 +00:00
Dale Wijnand 8d6ca826f9 Update sbt to 1.3.8 2020-02-15 08:49:53 +00:00
eugene yokota 1111b3c581
Merge pull request #5428 from eed3si9n/wip/js
Try to reproduce Scala.js + macro bug
2020-02-14 16:20:45 -05:00
eugene yokota 020c5c0cae
Merge pull request #5430 from eed3si9n/wip/servertest
Refactor server test
2020-02-14 11:13:46 -05:00
Eugene Yokota 7aa4034e73 Fix sbt.IllegalReferenceSpec 2020-02-14 09:01:11 -05:00
Eugene Yokota 72aa0780fc Format build.sbt 2020-02-14 00:06:34 -05:00
Eugene Yokota 02152cc41b Refactor server test
This refactors the server test to reuse the server instance for the tests against the same build.
2020-02-13 23:31:09 -05:00
Eugene Yokota a9e592996e Try to reproduce Scala.js + macro bug
Ref https://github.com/sbt/sbt/issues/5427
2020-02-12 15:24:41 -05:00
eugene yokota f5bd0fd096
Merge pull request #5423 from dwijnand/1.4/fix-coursier-classpath-order
Fix Coursier classpath order
2020-02-08 01:33:53 -05:00
Dale Wijnand 9eb51211d6 Fix Coursier classpath order 2020-02-07 07:04:38 +00:00
eugene yokota 06e8bc4476
Merge pull request #5419 from anilkumarmyla/update/coursier-2.0.0-RC5-6
Update coursier to 2.0.0-RC5-6
2020-02-04 15:45:45 -05:00
Anil Kumar Myla 6e25f1419b
Update coursier to 2.0.0-RC6 2020-02-04 11:47:08 -08:00
Anil Kumar Myla bbc25c5ec4
Update coursier to 2.0.0-RC5-6 2020-02-04 11:40:17 -08:00
eugene yokota dc34dd4955
Merge pull request #5416 from eed3si9n/wip/template
Update issue template
2020-02-04 12:24:14 -05:00
Eugene Yokota 3a10592bac Update issue template
I've been getting issue report that only fills out sbt version in the steps section.
Here's an attempt to fix that.
2020-02-03 14:28:20 -05:00
eugene yokota 7360e6342e
Merge pull request #5403 from eed3si9n/wip/artifacts
Fix the default artifact of packageSrc for custom configuration
2020-02-03 13:46:01 -05:00
eugene yokota ef68d16148
Merge pull request #5413 from raboof/coursierResolverOrder
Use project resolvers before dependency resolvers in coursier
2020-02-03 13:45:26 -05:00
Arnout Engelen 88623828d4 Use project resolvers before dependency resolvers in coursier
csrResolvers.all evaluates all possible scopes in arbitrary order. This change
makes sure at least the project resolvers are placed before any resolvers from
dependency projects.
2020-02-03 13:22:34 +01:00
eugene yokota f669fc734a
Merge pull request #5411 from eatkins/layering-error-message
Improve ClassLoader layering error message
2020-02-02 15:14:38 -05:00
Ethan Atkins 2c473fc31d Improve ClassLoader layering error message
When a class on the project classpath is loaded via reflection by one of
the parents of the project classloader, sbt run can fail with a
mysterious ClassNotFoundException. This is expected behavior but it
wasn't previously explained to the user.

Ref https://github.com/sbt/sbt/issues/5410.
2020-02-01 14:42:21 -08:00
Eugene Yokota c38181d39f Fix the default artifact of packageSrc for custom configuration
Fixes https://github.com/sbt/sbt/issues/5391
2020-01-26 22:55:26 -05:00
eugene yokota 996ee5f0d6
Merge pull request #5367 from eatkins/scripted-run-source-from-main
Run all scripted tests using RunFromSourceMain
2020-01-20 10:34:10 -05:00
Ethan Atkins eb66651886 Fix reboot full in RunFromSourceMain
The initial implementation of reboot full did not work correctly. After
this change, the project/extra scripted test, which exercises reboot
full works.
2020-01-19 09:04:27 -08:00
Ethan Atkins c47db91bdc Set jna.nosys=true in RunSourceFromMain
Without this, I saw errors on windows.
2020-01-19 09:04:27 -08:00
Ethan Atkins 15d3ed1298 Add extra classpath to the metabuild
When sbt was entered through xMain.run and the classloaders do not have
the expected format, sbt recreates the classloaders for itself.
Unfortunately the extra classpath was not added to the classloader. This
caused project/extra to fail if it was entered from RunFromSourceMain
rather than with the launcher.
2020-01-19 09:04:27 -08:00
Ethan Atkins 86eaf9d572 Allow RunSourceFromMain to use launcher
The repo overrides scripted test relies on using the launcher to modify
the default resolvers. To support this, I extended the scripted launcher
to use the bundled sbt launcher if it is passed in via the
`-Dsbt.launch.jar` system property.
2020-01-19 09:04:27 -08:00
Ethan Atkins ae4d3aecb8 Explicitly set scripted and server test classpath
This commit makes it so that the scalaVersion, sbtVersion and classpath
are always passed in as parameters to any method that creates an sbt
server -- either for scripted or for the sbt server tests. By making
that change, I was able to change the implementation of scripted in the
sbt project to use publishLocalBin instead of publishLocal. This makes
the scripted tests start much faster (doc alone can easily take 30
second) with messing with the build to exclude slow tasks from
publishLocal.

As part of this change, I removed the test dependency on scriptedSbtRedux for
sbtProj and instead had scriptedSbtRedux depend on sbtProj. This allowed
me to remove some messy LocalProject logic in the resourceGenerators for
scriptedSbtReduxProj. I also had to remove a number of imports in the
scriptedSbtReduxProj because the definitions available in the sbt
package object became available.

I also removed the dependency on sbt-buildinfo and instead pass the
values from the build into test classes using scalatest properties. I
ran into a number of minor issues with the build info plugin, namely
that I couldn't get fullClasspathAsJars to reliably run as a BuildInfo
key. It also is somewhat more clear to me to just rely on the built in
scalatest functionality. The big drawback is that the scalatest
properties can only be strings, but that restriction isn't really a
problem here (strangely the TestData structure has a field configMap
which is effectively Map[String, Any] but Any is actually always String
given how the TestData is created as part of framework initialization.

Since scripted no longer publishes, scriptedUnpublished is now
effectively an alias for scripted.

To get publishLocalBin working, I had to copy private code from
IvyXml.scala into PublishBinPlugin. Once we publish a new version of
sbt, we can remove the copied code and invoke IvyXml.makeIvyXmlBefore
directly.
2020-01-19 09:04:26 -08:00
Ethan Atkins 1ff5ff45bd Remove launcher based scriped runner
After the changes to `RunFromSourceMain` and the addition of
`Compile / exportJars` to the build, all of the tests pass with
RunFromSourceMain so I decided to remove the launcher based ones. The
RunFromSourceMain based tests are faster because they don't recompile
the various compiler bridges every time.
2020-01-19 09:04:26 -08:00