Commit Graph

124 Commits

Author SHA1 Message Date
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 4b23036c63 contraband 0.4.1 2018-09-18 16:56:19 -04:00
Eugene Yokota 4ff4f6e45e Update header 2018-09-14 04:53:36 -04:00
Eugene Yokota 306ee82db3 Use MessageOnlyException for "Nonzero exit code" 2018-06-27 07:09:59 -04:00
Dale Wijnand 8f4b8abb7b
Run scalafmt & test:scalafmt 2018-04-24 16:12:10 +01:00
Eugene Yokota c2837c7714 Merge branch 'wip/bumpsbt' into wip/merge-1.1.x 2018-03-27 10:16:10 -04:00
Dale Wijnand dd4de14593
Upgrade to contraband 0.4.0 2018-03-12 15:39:07 +00:00
Dale Wijnand ed5a8c118b
Upgrade to contraband 0.3.3 2018-03-08 12:49:38 +00:00
Dale Wijnand 90cd60f3b9
Merge branch '1.1.x' into merge-1.1.x-into-1.x
* 1.1.x:
  Use Java's redirectInput rather than sys.process's connectInput
  Re-write toolboxClasspath to use sbt-buildinfo
  Cleanup generateToolboxClasspath
  Upgrade to sbt-buildinfo 0.8.0
  Fix how fullClasspath is defined in TestBuildInfo
  delete buildinfo.BuildInfo from sbt main

Conflicts:
	project/plugins.sbt
2018-02-28 10:30:53 +00:00
Jason Zaugg b0f52510e0 Use Java's redirectInput rather than sys.process's connectInput
Fixes #3737
2018-02-26 11:30:30 +10:00
Dale Wijnand 113656aed1
Remove compile warnings 2018-01-16 11:17:01 +00:00
Simon Schäfer 187a861194 Fix unused pattern match vals in run project 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 7b2b7d696b Don't wrap InputStream for Windows
Ref #3282

We used to wrap InputStream so it will inject Thread.sleep, which then allows the thread to be cancelled, emulating a non-blocking readLine. This trick doesn't seem to work for Windows.
For non-Cygwin, actually just removing the wrapping does the job, but I couldn't get it to work for Cygwin.

To test, run some command via network, and then type `show name` into the terminal. On Cygwin, it will not respond.
2017-07-22 03:34:10 -04:00
Eugene Yokota 00a9dd14a4 Bump Contraband to latest 2017-07-17 01:05:30 -04:00
jvican 26cfe0cb7b
Remove any reference to `F0` and `F1`
Syncs with https://github.com/sbt/zinc/pull/359 and
https://github.com/sbt/util/pull/84.
2017-07-14 17:29:06 +02:00
Eugene Yokota efa3b1d340
Bump to latest io, scalajson, sjsonnew, contraband, util, lm, zinc 2017-07-06 11:05:24 +01:00
Eugene Yokota 3724277704 migrate ForkOptions to Contraband 2017-05-12 05:22:08 -04:00
Eugene Yokota da046791e0 Apply Scalafmt formatting 2017-04-21 04:48:31 -04:00
Dale Wijnand a6015793e2
Code formatting only changes 2017-04-11 14:32:38 +01:00
eugene yokota e23fa31f08 Merge pull request #2810 from kzys/remove-process-extra
Remove ProcessExtra and the use of java.lang.ProcessBuilder
2017-01-21 17:06:41 -05:00
Eugene Yokota 1e960b324c Implement copyClasspath for bgRun
Copies products to the workind directory, and the rest to the serviceTempDir of this service, both wrapped in SHA-1 hash of the file contents. This is intended to mimize the file copying and accumulation of the unused JAR file. Since working directory is wiped out when the background job ends, the product JAR is deleted too. Meanwhile, the rest of the dependencies are cached for the duration of this service.
2017-01-20 13:02:31 -05:00
Eugene Yokota 74cfbd4a9c Implement bgRun based on sbt-core-next 2017-01-20 13:02:31 -05:00
Josh Soref 524579d87a spelling: evaluate 2017-01-20 08:13:44 +00:00
Josh Soref c81894e45b spelling: command 2017-01-20 08:10:32 +00:00
Dale Wijnand 43821667bf
Upgrade scalariform version 2016-12-11 12:13:11 +00:00
Kazuyoshi Kato 1f2c00cc56 Remove ProcessExtra and the use of java.lang.ProcessBuilder
Fixes #2736.
2016-10-27 19:31:46 -07:00
Dale Wijnand 84c611af36 Remove unused vals/defs 2016-07-12 14:31:35 +01:00
Dale Wijnand deea82542c Remove unused imports 2016-07-12 11:55:10 +01:00
Dale Wijnand 222a970080 Kill some vars 2016-07-07 01:39:52 +01:00
Dale Wijnand 8226ed7682 Cleanup runProj 2016-06-21 08:09:29 +01:00
Eugene Yokota 5f9e6e4aad Don't use test artifacts from other projects
Fixes #2597
2016-05-12 12:45:09 -04:00
Martin Duhem a2abb6eeb6 Update to latest version of incremental, fix imports 2015-09-16 10:16:03 +02:00
Martin Duhem c981abd295 Fix all imports 2015-09-14 14:28:09 +02:00
Pierre DAL-PRA 8f1fb2d232 Fix additional warnings 2015-08-07 00:23:14 +02:00
Pierre DAL-PRA 54d54b9f4f Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
Pierre DAL-PRA b9171e59ad Simplify operations on collections 2015-08-01 02:25:17 +02:00
Jean-Rémi Desjardins ca736e55d3 Minor code cleanup 2014-12-03 09:56:34 -08:00
Josh Suereth 244abd3b6f Scalariforming test code 2014-05-07 11:52:23 -04:00
Eugene Yokota adb41611cf added scalariform 2014-05-01 12:50:07 -04:00
Mark Harrah 32d28ab85b Override certain SecurityManager methods to avoid filesystem performance hit. 2014-03-06 07:39:06 -05:00
Mark Harrah 140ce04809 Fix #1024. Use log.debug instead of println in TrapExit. 2013-12-05 12:00:00 -05:00
Mark Harrah e16864f2e7 Drop Thread.getName from use in computeID(thread) in TrapExit SecurityManager to fix #997. 2013-11-27 08:53:52 -05:00
Mark Harrah f3c050921a Fixes #989, #990. TrapExit jvm-independent and awt handling is only done when awt is used.
SecurityManager.checkAccess(ThreadGroup) is specified to be called for every Thread creation
and every ThreadGroup creation and is therefore jvm-independent.  This can be used to get all
Threads associated with an application with good enough accuracy.

An application will be marked as using AWT if it gets associated with the AWT event queue thread.
To avoid unwanted side effects of accidental AWT initialization, TrapExit only tries to dispose
frames when an application is so marked.  Only one AWT application is supported due to a lack of
a way to associate displayed windows with an application.
2013-11-18 17:35:06 -05:00
Mark Harrah 0781cee4b3 Fix NPE in TrapExit due to improper scoping of null check. 2013-10-08 18:41:13 -04:00
Mark Harrah 60426facba TrapExit support for multiple, concurrent managed applications. Fixes #831. 2013-10-02 09:13:45 -04:00
Mark Harrah b8b6426cf9 Allow main class to be non-public. Fixes #883. 2013-09-26 09:42:30 -04:00
James Roper 743ce99315 String upper/lower case no longer locale dependent
Fixed many instances of the Turkish i bug.

Spare a thought for the poor Turks!
2013-09-24 08:14:15 -04:00
Mark Harrah 7b1b33758c Convert -classpath to CLASSPATH when forking on Windows and length exceeds a heuristic maximum. Fixes #755. 2013-09-11 18:22:16 -04:00
Mark Harrah 53e6db4831 fix ForkScala.fork overload, which forwarded to itself, looping 2013-08-06 13:59:19 -04:00
Mark Harrah ebd35983b1 API docs: Fork.scala 2013-08-06 13:59:19 -04:00
Mark Harrah b560ef280e Fork run directly with 'java' to avoid additional class loader from 'scala' command. Fixes #702. 2013-04-05 09:02:24 -04:00
Mark Harrah 4630222aaa Deprecate old Scala+Java fork interfaces in favor of Fork+ForkOptions 2013-04-05 09:02:24 -04:00
Mark Harrah f6d73128fc deprecations 2013-02-25 09:24:04 -05:00
Mark Harrah bd0f208302 Class loader that restricts loading to a classpath. Ref #661.
It is now used for consoleProject, run, and test.  This loader verifies
that all classes loaded through it came from a particular classpath or
from the "root" loader.  Root loader here is the launcher loader so that
those classes with native bindings come from that shared loader.
2013-02-21 20:44:26 -05:00
Mark Harrah 98e2662bc4 Make full set of ForkOptions configurable for both run and test. Fixes #665.
Environment variables may be passed by configuring the envVars task.
2013-02-21 20:44:26 -05:00
Mark Harrah c0b1bb51e6 -Xlint 2013-02-04 17:30:31 -05:00
Paolo G. Giarrusso 236143be8d Silence boring Eclipse warnings: catching all exceptions
Here I make explicit where catching all exceptions is intended.
Mark Harrah corrected one decision during review.
2013-01-22 09:05:15 -05:00
Grzegorz Kossakowski ef39aeb9c1 Follow source layout convention supported by Eclipse.
Moved source files so directory structure follow package
structure. That makes it possible to use Scala Eclipse plugin
with sbt's source code.
2012-12-07 10:27:08 -08:00
Indrajit Raychaudhuri 2698bc3116 Prevent 'radio silence' for ForkRun.run().
While this increases the verbosity level of `Fork.run()`, it remains
consistent with `Run.run()`. Switching between `fork := false` and
`fork := true` shouldn't change verbosity of log output.
2011-11-10 15:47:25 +05:30
Indrajit Raychaudhuri 66500ea776 Use full form of `-classpath` option
short form `-cp` isn't always honored (e.g., javadoc)
2011-11-04 13:40:59 -04:00
Mark Harrah 5fd3c1d2e5 task execution interruptible using ctrl+c. fixes #228,#229
- interrupts task execution only
- no further tasks scheduled
- existing tasks interrupted
- a task must terminate any other started threads when interrupted
- set cancelable to true to enable
- currently, 'run' properly terminates if the application properly
   terminates when interrupted
- 'console' does not, 'test' depends on the test framework

- also bundled: set connectInput to true to connect standard input to forked run
2011-10-18 22:43:25 -04:00
Mark Harrah b40a2f31ea log toString of exception in non-main threads to indicate a trace exists. fixes #157 2011-08-23 19:53:33 -04:00
Mark Harrah 1d4d566d6b support use of native libraries in 'run' and 'test' 2011-08-05 21:56:32 -04:00
Mark Harrah 903690ce8c don't handle threads/trap exit for user 'runTask' by default 2011-05-15 21:01:03 -04:00
Mark Harrah b996a95157 cleanup 2011-03-11 16:52:12 -05:00
Mark Harrah a68e4c74f9 updating more integration tests 2011-02-25 18:35:52 -05:00
Mark Harrah de3ad8c860 eliminate temporary directory for injecting resources into a class loader 2010-11-13 20:16:44 -05:00
Mark Harrah 1e11ef13cd minor rework of main class selection 2010-09-27 18:52:13 -04:00
Mark Harrah 5a13de4ff7 move remaining pieces of sbt subproject to sbt_pending and fix notices 2010-09-21 21:55:50 -04:00
Mark Harrah b4eea78959 cleanup 2010-09-04 08:07:51 -04:00
Mark Harrah d7b66458f2 first shot at general command/definition model 2010-07-17 12:07:41 -04:00
Mark Harrah d0fa1eb461 * move Environment classes to util/env module
* move TrapExit, SelectMainClass to run module
* rearrange some compilation-related code
* Jetty-related code moved to web module
2010-07-14 19:24:50 -04:00