Commit Graph

571 Commits

Author SHA1 Message Date
eugene yokota 265cbd78b1 Fixes #2480. Workaround for Jline regression (#2570)
Workaround jline/jline2#205
2016-04-23 23:56:25 -04:00
Martin Duhem 1bda41fc31 Address problems reported by Codacy 2016-02-23 15:19:04 +01:00
Martin Duhem e35f9bb11e Completion for build-level keys
sbt's shell provided completion only for keys that were relative to a
defined project, but didn't provide completion for keys that belong to
the build definition only.

This commit fixes this issue by defining a new kind of `Parser` (from
which completions are generated) which runs its input simultaneously on
distinct parsers. We now define a parser for project-level keys and
another parser for build-level keys. These two parsers are eventually
combined, and we get the completions of both parsers.

Fixes sbt/sbt#2460
2016-02-23 15:11:15 +01:00
Guillaume Martres 10265efd9c Make sbt aware of Dotty
This small set of changes, together with the compiler-bridge I wrote
(https://github.com/smarter/dotty-bridge) enables us to compile code
using Dotty in sbt, see https://github.com/smarter/dotty-example-project
for an example.
2016-01-03 20:35:29 +01:00
Eugene Yokota 068cffa578 Reimplement fallback to system classloader to maintain the 0.13 semantics 2015-12-30 07:36:12 -05:00
Eugene Yokota db81fa2109 Fix bincompat issue introduced in #2268 2015-12-30 06:22:55 -05:00
Stu Hood 9fbbaab58e Add a test that we`re able to parse inner classes. 2015-11-10 14:45:04 -08:00
Stu Hood 5fbfa7aeb0 Move back to ClassLoader.getSystemClassloader 2015-09-20 09:28:43 -07:00
Stu Hood 9401d47e79 Remove copyright from IOSpecification, and use a simpler Resource lookup. 2015-09-20 08:42:10 -07:00
Stu Hood 198820bc53 Move io tests to subdirectory, and add a test for "System" class lookups. 2015-09-18 17:15:52 -07:00
Stu Hood 5a3b95cd6d Add support for parsing system classes. 2015-09-18 16:37:22 -07: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 f0bd9001e6 Remove redundant collection conversions 2015-08-01 12:05:35 +02:00
Pierre DAL-PRA b9171e59ad Simplify operations on collections 2015-08-01 02:25:17 +02:00
Pierre DAL-PRA 13b37cc987 Fix several warnings 2015-07-17 09:17:42 +02:00
Josh Suereth 4abc8386f2 Merge pull request #2085 from twitter-forks/stuhood/java-static-final-fields-as-singletons
Encode static-final constant fields as Singletons
2015-07-14 12:35:56 -04:00
Stu Hood 7e7aca5f55 Mismatch APIs on type changes as well 2015-07-13 21:29:14 -07:00
Josh Suereth 0e861c9867 Merge pull request #2094 from pdalpra/public-null-logger
Make Logger.null public + minor clean up
2015-07-10 12:48:46 -04:00
Stu Hood a80c3e2bb8 Review feedback 2015-07-09 22:01:05 -07:00
Adriaan Moors a355012c2e Do not use `ListBuffer#readOnly`
It's dangerous, deprecated, and was removed in 2.12.0-M1.
See https://github.com/scala/scala/pull/4140.

`ListBuffer#toList` has equivalent performance,
except it actually returns an immutable copy(-on-write).
2015-07-09 14:49:08 -07:00
Pierre DAL-PRA 4e9626eb68 Minor clean up 2015-07-09 22:59:05 +02:00
Pierre DAL-PRA 771f08cb61 Make Logger.Null public 2015-07-09 22:58:47 +02:00
Stu Hood 6846bbd3ed Encode static-final constant fields as Singletons, so that when the api changes, they change. 2015-07-01 21:37:32 -07:00
Eugene Yokota 16b95a4d62 Add distinctPath 2015-06-28 14:41:32 -04:00
Eugene Yokota 4bae8b3acb Fixes #1973. Renames distinct to distinctName 2015-06-27 05:56:43 -04:00
David Perez d27c7f40c2 Merge remote-tracking branch 'upstream/0.13' into 0.13 2015-06-04 12:43:32 +02:00
Vitalii Voloshyn 54081fb4e4 Prevent history command(s) from going into an infinite loop [1562] 2015-05-18 13:33:31 +03:00
David Perez 40b647e599 Issue 2008: provide more diagnostic info for undefined setting 2015-05-08 09:29:41 +02:00
Josh Suereth 923f4261d0 Fix ANSI escape sequences.
Now we handle the CSI (ESC + [).

Fixes #1143
2015-02-28 08:30:59 -05:00
henry 6545deacc8 Fix #1368 - getResources should never return null 2015-02-11 13:33:40 +00:00
Eugene Yokota 69171f40b3 Auto style fix 2015-02-02 14:56:13 -05:00
Indrajit Raychaudhuri 1f90ef6b43 Fix params order in `@deprecated` 2015-01-17 08:25:57 +05:30
eugene yokota be78b7fc4c Merge pull request #1759 from jedesah/topic/minor_cleanup
Minor code cleanup
2015-01-14 16:13:06 -05:00
Derek Wickern b3cab0f2a0 Fix logger not overwriting the previous line in alternate shells
When running the 'update' task in bash, the output is all collapsed onto one line.
On Windows, even using an ANSI capable shell, running 'update' spams the console.

Tested with dash in Ubuntu; ANSICON, Console2 and ConsoleZ in Windows.
2014-12-11 11:21:23 -08:00
Jean-Rémi Desjardins ca736e55d3 Minor code cleanup 2014-12-03 09:56:34 -08:00
Grzegorz Kossakowski 015c61ad69 Merge pull request #1736 from Duhemm/dependency-kind-compile
Abstract over dependency kind in Compile
2014-12-02 16:00:22 +01:00
Eugene Yokota 416ffa76d1 merge 0.13.7 manually 2014-11-19 14:34:08 -05:00
Martin Duhem 98c789b826 Abstract over dependency context in Compile
This commit completes the abstraction over dependency kinds in the
incremental compiler, started with #1340.
2014-11-19 10:35:07 +01:00
Eugene Yokota c1fc84662f scalariform 2014-11-04 17:48:46 -05:00
eugene yokota b9964d5153 Merge pull request #1702 from jsuereth/wip/incremental-compiler-javac-cleanup
Create a new API for calling Java toolchains.
2014-10-31 15:31:14 -04:00
Josh Suereth 70cdce0830 Create a new API for calling Java toolchains.
* Create a new sbt.compiler.javac package
* Create new interfaces to control running `javac` and `javadoc` whether forked or local.
* Ensure new interfaces make use of `xsbti.Reporter`.
* Create new method on `xsbti.compiler.JavaCompiler` which takes a `xsbti.Reporter`
* Create a new mechanism to parse (more accurately) Warnings + Errors, to distinguish the two.
* Ensure older xsbti.Compiler implementations still succeed via catcing NoSuchMethodError.
* Feed new toolchain through sbt.actions.Compiler API via dirty hackery until we can break things in sbt 1.0
* Added a set of unit tests for parsing errors from Javac/Javadoc
* Added a new integration test for hidden compilerReporter key, including testing threading of javac reports.

Fixes #875, Fixes #1542,  Related #1178 could be looked into/cleaned up.
2014-10-29 20:06:08 -04:00
Josh Suereth fe712173f3 Fix BC issue discovered in #1696.
Def.derive has a new parameter, so we add an override which delegates down to the new method.
2014-10-28 10:21:41 -04:00
Eugene Yokota 3f958a5bce enable -deprecation for Scala 2.10
Enable -deprecation flag to catch old code being use when we migrate
things.
In this commit I moved error to sys.error.
2014-10-10 15:42:26 -04:00
Jean-Rémi Desjardins ff9baf5987 Merge branch 'refs/heads/0.13' into topic/remove-warnings 2014-09-10 23:24:53 -07:00
Jean-Rémi Desjardins ced5230289 Remove some compiler warnings 2014-09-10 22:55:43 -07:00
Josh Suereth da1fc33b52 Removing printlns and adding the test, DOH. 2014-09-09 09:16:10 -04:00
Josh Suereth d2950da9dd Fix issue where ScalaInstance broke the thread-context-classloader for all scala classes.
The issue is that when you manually set a ScalaInstance, i.e. not one from Ivy, the
classpath which is returned for any given configuration ONLY uses Ivy.   This means that
the legitimate Scala JAR files that need to be on the classpath are missing from the list.
For some reason, the way we instantiate tests uses an unfiltered classloader against the
ScalaInstance, *BUT* the thread-context-classloader DOES use a filtered instance by
classpath.   This add the hook into the TestFramework runner creation so that
the classpath accurately reflects the jars needed.

cc @rkuhn
2014-09-09 08:56:51 -04:00
Josh Suereth 50460fad28 Add toString methods to classloaders, for debugging.
* Add toString methods to all classloader classes.
2014-09-09 08:56:20 -04:00
Antonio Cunei a6d85ae2cb Allow the "-bin" Scala version suffix to specify a bincompat version
There is sometimes the need to use a test version of Scala that is
intended to be binary compatible with a standard release version.

At this time, due to the particular logic implemented within sbt,
a non-numeric suffix will never have the same binaryScalaVersion
of a release version ending in ".0", like for instance "2.11.0".

This commit allows developers to use as suffix any string that
begins with "-bin", for instance "2.11.0-bin-compat-test-1".
Such a suffix will have a binaryScalaVersion of "2.11", being
therefore considered binary compatible with release versions.
2014-09-04 01:15:58 +02:00