Commit Graph

17940 Commits

Author SHA1 Message Date
Alexandre Archambault 55f457a6f7 Add DependencyResolutionInterface implementation in lm-coursier
Originally based on https://github.com/sbt/librarymanagement/pull/270
2018-11-20 11:25:16 +01:00
Alexandre Archambault 610bbf1113 Minor tweaking 2018-11-20 10:18:18 +01:00
Alexandre Archambault af041251c1
Refactor sbt-coursier, move bits of it to new lm-coursier module (#6) 2018-11-20 10:16:08 +01:00
Ethan Atkins c00cc37953 Do not require leading semicolon for multi command
It has long been a frustration of mine that it is necessary to prepend
multiple commands with a ';'. In this commit, I relax that restriction.
I had to reorder the command definitions so that multi comes before act.
This was because if the multi command did not have a leading semicolon,
then it would be handled by the action parser before the multi command
parser had a shot at it. Sadness ensued.
2018-11-19 10:42:51 -08:00
Ethan Atkins 51d986d751 Make multi command parser work with string literals
Presently the multi command parser doesn't work correctly if one of the
commands includes a string literal. For example, suppose that there is
an input task defined name "bash" that shells out and runs the input.
Then the following does not work with the current multi command parser:
; bash "rm target/classes/Foo.class; touch src/main/scala/Foo.scala"; comple
Note that this is a real use case that has caused me issues in the past.

The problem is that the semicolon inside of the quote gets interpreted
as a command separator token. To fix this, I rework the parser so that
it consumes string literals and doesn't modify them. By using
StringEscapable, I allow the string to contain quotation marks itself.

I couldn't write a scripted test for this because in a command like
`; foo "bar"; baz`, the quotes around bar seem to get stripped. This
could be fixed by adding an alternative to StringEscapable that matches
an escaped string, but that is more work than I'm willing to do right
now.
2018-11-19 10:38:22 -08:00
Ethan Atkins 05e3a8609b Fix watch command parser
I discovered that when I ran multi-commands with '~' that if there was a
space between the ';' and the command, then the parsing of the command
would fail and the watch would abort. To fix this, I refactor
Watched.watch to use the multi command parser and, if that parser fails,
we fallback on a single command.
2018-11-19 10:38:22 -08:00
Ethan Atkins 4281972f1a Refactor multi parser
Prior to this commit, there was no unit testing of the parser for
multiple commands. I wanted to make some improvements to the parser, so
I reworked the implementation to be testable. This change also allows
the multiParserImpl method to be shared with Watched.watch, which I will
also update in a subsequent commit.

There also were no explicit scripted tests for multiple commands, so I
added one that I will augment in later commits.
2018-11-19 10:38:22 -08:00
Eugene Yokota 44074983bc util 1.3.0-M3 2018-11-18 12:12:38 -05:00
eugene yokota 962b891aa1
Merge pull request #188 from eed3si9n/wip/prompt-fix
expose ANSI control sequences
2018-11-17 22:09:19 -08:00
Eugene Yokota b00dcb1b9d Fix task progress blank line behavior
Run readyLog lazily.
2018-11-16 23:06:36 -08:00
Eugene Yokota d58b302a97 Fix prompt for task progress 2018-11-16 23:05:51 -08:00
Eugene Yokota 9f202397e4 expose ANSI control sequences 2018-11-16 23:03:25 -08:00
Alexandre Archambault 58e8dae7e3
Merge pull request #4 from alexarchambault/develop
Various stuff
2018-11-14 15:50:58 +01:00
Alexandre Archambault 348a9f00c7 Make sbt-shared a simple library
Rather than a kind of sbt plugin
2018-11-14 14:52:36 +01:00
Alexandre Archambault e5b2e2ee13 Remove now unused sbt-compat
Unnecessary since sbt 0.13 support was dropped
2018-11-14 14:49:01 +01:00
Alexandre Archambault 49236d2e8f Remove unused stuff in build 2018-11-14 14:47:52 +01:00
eugene yokota 93d77d593f
Merge pull request #4449 from eatkins/managed-source-fix-develop
Fix '~' for dependent projects with a broken parent
2018-11-13 15:49:50 -08:00
eugene yokota 67b109c4bd
Merge pull request #4447 from eatkins/managed-source-fix
Fix '~' for dependent projects with a broken parent (1.2.x)
2018-11-13 12:59:05 -08:00
Ethan Atkins fd2ec7adc3 Fix '~' for dependent projects with a broken parent
In #4446, @japgolly reported that in some projects, if a parent project
was broken, then '~' would immediately exit upon startup. I tracked it
down to this managed sources filter. The idea of this filter is to avoid
getting stuck in a build loop if managedSources writes into an unmanaged
source directory. If the (managedSources in ThisScope).value line
failed, however, it would cause the watchSources, and by delegation,
watchTransitiveSources task to fail. The fix is to only create this
filter if the managedSources task succeeds.

I'm not 100% sure if we shouldn't just get rid of this filter entirely
and just document that '~' will probably loop if a build writes the
result of managedSources into an unmanaged source directory.
2018-11-11 09:36:46 -08:00
Ethan Atkins 7b5cf84fe1 Fix '~' for dependent projects with a broken parent
In #4446, @japgolly reported that in some projects, if a parent project
was broken, then '~' would immediately exit upon startup. I tracked it
down to this managed sources filter. The idea of this filter is to avoid
getting stuck in a build loop if managedSources writes into an unmanaged
source directory. If the (managedSources in ThisScope).value line
failed, however, it would cause the watchSources, and by delegation,
watchTransitiveSources task to fail. The fix is to only create this
filter if the managedSources task succeeds.

I'm not 100% sure if we shouldn't just get rid of this filter entirely
and just document that '~' will probably loop if a build writes the
result of managedSources into an unmanaged source directory.
2018-11-11 09:35:46 -08:00
eugene yokota f10455fe40
Merge pull request #4431 from andreaTP/sbtBig
adding sbt-big to the build
2018-11-10 01:53:51 -05:00
eugene yokota ab5e99c9c8
Merge pull request #4443 from eed3si9n/wip/metabuild-classpath
Use the classpath obtained by the launcher for metabuild
2018-11-09 16:43:32 -05:00
Eugene Yokota c51c00bb3f Use app classpath for metabuild
Fixes #4437

Until now, sbt was resolved twice once by the launcher, and the second time by the metabuild.
This excludes sbt from the metabuild graph, and instead uses app classpath from the launcher.
2018-11-09 04:32:38 -05:00
Eugene Yokota c91371b7f8 add isMetaBuild setting
Fixes #3436

This implements isMetaBuild setting that is explicitly for meta build only,
unlike sbtPlugin setting which can be used for both meta build and plugin development purpose.
2018-11-09 03:08:47 -05:00
andrea 39493f7869 adding a fatjar release (aka sbt-big) to the build 2018-11-07 08:37:49 +00:00
eugene yokota 4a0a6c77bc
Merge pull request #278 from eed3si9n/wip/thread-pool
Use fixed thread pool
2018-11-06 17:32:59 -05:00
Eugene Yokota d30556f19e Refactor compiler bridge unit test
This refactors the compiler bridge unit test to use the normal Zinc facility,
namely AnalyzingCompiler that's built on Scala 2.12, but is capable of driving
the compiler bridge built on non-2.12.
This allows us to run the unit tests without any additional dependencies published for Scala 2.13.0-M5.
2018-11-06 13:46:24 -05:00
Alexandre Archambault 22595d07af
Merge pull request #3 from alexarchambault/develop
Switch to latest coursier
2018-11-05 11:28:25 +01:00
Alexandre Archambault 9e9f875cf1 Clean-up sbt 0.13 specific files 2018-11-05 10:38:35 +01:00
Alexandre Archambault 9dc3651845 Tweak scripted test 2018-11-05 10:37:03 +01:00
Alexandre Archambault 6c8f06bd88 Tweak build.sbt 2018-11-05 10:35:18 +01:00
Alexandre Archambault 0906201eb1 Switch to latest coursier 2018-11-05 10:35:10 +01:00
Eugene Yokota 29183f2fad Use fixed thread pool
Fixes #274

In #249 parallel download switched to using its own thread pool.
It could potentially lead to unbounded download if nobody throttled.
This works around the issue by fixing the number of thread to 6, which is a common per-host max connection count.
2018-11-01 02:27:19 -04:00
eugene yokota edd0c34186
Merge pull request #4436 from eatkins/unload-view
Close the current global file tree view on unload
2018-10-30 03:05:39 -04:00
Ethan Atkins 7ec65f174d Close the current global file tree view on unload
I noticed that when using the latest nightly, triggered execution would
fail to work if I switched projects with, e.g. ++2.10.7. This was
because the background thread that filled the file cache was incorrectly shutdown.
To fix this, we just need to close whatever view is cached in the
globalFileTreeView attribute in the exit hook rather than the view
created by the method.

After making this change and publishing a local SNAPSHOT build, I was
able to switch projects with ++ and have triggeredExecution continue to
work.
2018-10-29 14:21:36 -07:00
eugene yokota 92f8b75557
Merge pull request #277 from eed3si9n/wip/bump
Bump IO and Util
2018-10-29 15:16:39 -04:00
Eugene Yokota 08b8491c7f Bump IO and Util 2018-10-29 14:25:01 -04:00
eugene yokota 4b179e526d
Merge pull request #270 from andreaTP/coursierAgain
Add Coursier as a  library management implementation
2018-10-29 13:26:30 -04:00
Alexandre Archambault ca81973f5e
Merge pull request #2 from coursier/develop
Various things
2018-10-29 17:20:06 +01:00
Alexandre Archambault 594eb47bc5 Don't force scala version if autoScalaLibrary is false 2018-10-29 11:30:34 +01:00
Alexandre Archambault ce6c7a2c64 Fix scripted test 2018-10-29 11:14:13 +01:00
Andrea Peruffo 11fdf8e31c adding multi-project test 2018-10-28 08:54:26 +00:00
andrea abc6d69271 compatibility with 2.12 2018-10-24 17:43:49 +01:00
andrea 1951da25bb rework again configurations management 2018-10-24 15:14:43 +01:00
andrea eeddaa3f5d cleaning up scripted test 2018-10-24 13:15:43 +01:00
andrea 33de2221f7 fixing tests 2018-10-24 12:18:16 +01:00
andrea 2e6870d17e minor cleanup and using missingOk instead of external property 2018-10-24 11:49:51 +01:00
Alexandre Archambault 3b7b2ffbb7 Tweak configuration handling 2018-10-24 11:29:05 +01:00
andrea a03f0ad437 Add ignore errors flag 2018-10-22 14:57:44 +01:00
andrea 5ceed97587 better attributes management and plugin resolution test disabled 2018-10-19 14:40:22 +01:00