Commit Graph

106 Commits

Author SHA1 Message Date
Eugene Yokota 590dc5e96d Merge branch '1.2.x' into wip/merge-1.2.x 2018-08-16 16:15:15 -04:00
Eugene Yokota 780ca366d8 Remove warnings about configuration
Fixes #4293
Ref #4231, #4065

This fixes the regression on sbt 1.2.0 that displays a lot of warnings about configurations.

The warning was added in #4231 in an attempt to fix #4065. This actually highlights somewhat loose usage of configurations among the builds in the wild, and the limitation on the current slash syntax implementation.

I think we can remove this warning for now, and try to fix #4065 by making slash syntax more robust. In particular, we need to memorize the mapping between the configuration name and Scala identifier across the entire build, and use that in the shell.
2018-08-06 00:22:57 -04:00
Eugene Platonov cc2159d565 add human readable total time 2018-07-21 15:56:48 -04:00
eugene yokota 8692952e91
Merge pull request #4245 from raboof/selectLatestJavaVersion
Select most recent JDK
2018-07-03 12:29:47 -04:00
Arnout Engelen 46693548d7 Add missing copyright header 2018-07-03 15:50:57 +02:00
Arnout Engelen 57e3183b8d Discover jvm installed via Oracle Linux RPM's 2018-07-03 15:29:31 +02:00
Arnout Engelen 7630ed8201 Select most recent jdk
When multiple jdk minor/patch versions are available, select the most
recent one.
2018-07-03 11:06:04 +02:00
Jason Pickens c9aa0c5285 Add warning for unknown project configurations. 2018-06-27 18:25:10 +12:00
Eugene Yokota 932f911483 addPluginSbtFile command
Fixes https://github.com/sbt/sbt/issues/1502

This adds `--addPluginSbtFile=<file>` command, which adds the given .sbt file to the plugin build.
Using this mechanism editors or IDEs can start a build with required plugin.

```
$ cat /tmp/extra.sbt
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.7")

$ sbt --addPluginSbtFile=/tmp/extra.sbt
...
sbt:helloworld> plugins
In file:/xxxx/hellotest/
  ...
  sbtassembly.AssemblyPlugin: enabled in root
```
2018-06-18 01:50:36 -04:00
Eugene Yokota 28e90ea09b Merge branch '1.1.x' into wip/merge-1.1.x 2018-04-29 14:31:30 -04:00
Dale Wijnand 8f4b8abb7b
Run scalafmt & test:scalafmt 2018-04-24 16:12:10 +01:00
Dale Wijnand 25988d2256
Cleanup test/ParseKey 2018-03-28 09:04:12 +01:00
Eugene Yokota b82a1870a7 add tests around scope delegation 2018-03-10 17:24:39 -05:00
Dale Wijnand 113656aed1
Remove compile warnings 2018-01-16 11:17:01 +00:00
Dale Wijnand a90832b593
Remove all warnings from mainProj 2017-12-14 15:40:03 +00:00
Dale Wijnand 2390fdfac6
Remove all warnings from mainSettingsProj 2017-12-14 13:16:23 +00:00
wpopielarski 452e97e41d Adds backticks to class/trait/object name.
Adapts tests to changed specs2 dependency.

Tiny fixes.

Removes Scala IDE compiler clues.
2017-11-28 13:27:15 -05:00
wpopielarski 73b0034cfc textDocument/definition for LSP / VS Code
This is an implementation of `textDocument/definition` request.
Supports types only, and only in case when type is found in Zinc Analysis. When source(s) are found then editor opens potential source(s).
This simple implementation does not use semantic data.

During the processing of `textDocument/didSave`, we will start collecting the location of Analysis files via `lspCollectAnalyses`.
Later on, when the user asked for `textDocument/definition`, sbt server will invoke a Future call to lspDefinition, which direct reads the files to locate the definition of a class.
2017-11-28 13:27:07 -05:00
xuwei-k 6b4093dc15 update specs2 4.0.1 2017-11-26 13:59:50 +09:00
Dale Wijnand a41727fb17
Add, configure & enforce file headers 2017-10-05 09:03:40 +01:00
eugene yokota 7af716f37b Merge pull request #3524 from eed3si9n/wip/language_server
language server protocol (VS Code integration)
2017-10-03 11:56:26 -04:00
Eugene Yokota f188e60d8f Update test 2017-10-02 17:12:15 -04:00
Dale Wijnand e7b893fdc5
Cleanup and improve the unified slash syntax 2017-10-02 17:24:37 +01:00
Eugene Yokota b0306b738e Add whitespaces in Show of scoped keys
```
Provided by:
    ProjectRef(uri("...."), "root") / Test / test
Dependencies:
    Test / executeTests
    Test / test / streams
    Test / state
    Test / test / testResultLogger
```
2017-09-28 03:34:49 -04:00
Eugene Yokota 33a01f3ceb Unified slash syntax
Fixes sbt/sbt#1812

This adds unified slash syntax for both sbt shell and the build.sbt DSL.
Instead of the current `<project-id>/config:intask::key`,
this adds `<project-id>/<config-ident>/intask/key` where <config-ident> is the Scala identifier notation for the configurations like `Compile` and `Test`.

This also adds a series of implicits called `SlashSyntax` that adds `/` operators to project refererences, configuration, and keys such that the same syntax works in build.sbt.

These examples work for both from the shell and in build.sbt.

    Global / cancelable
    ThisBuild / scalaVersion
    Test / test
    root / Compile / compile / scalacOptions
    ProjectRef(uri("file:/xxx/helloworld/"),"root")/Compile/scalacOptions
    Zero / Zero / name

The inspect command now outputs something that can be copy-pasted:

    > inspect compile
    [info] Task: sbt.inc.Analysis
    [info] Description:
    [info] 	Compiles sources.
    [info] Provided by:
    [info] 	ProjectRef(uri("file:/xxx/helloworld/"),"root")/Compile/compile
    [info] Defined at:
    [info] 	(sbt.Defaults) Defaults.scala:326
    [info] Dependencies:
    [info] 	Compile/manipulateBytecode
    [info] 	Compile/incCompileSetup
    [info] Reverse dependencies:
    [info] 	Compile/printWarnings
    [info] 	Compile/products
    [info] 	Compile/discoveredSbtPlugins
    [info] 	Compile/discoveredMainClasses
    [info] Delegates:
    [info] 	Compile/compile
    [info] 	compile
    [info] 	ThisBuild/Compile/compile
    [info] 	ThisBuild/compile
    [info] 	Zero/Compile/compile
    [info] 	Global/compile
    [info] Related:
    [info] 	Test/compile
2017-09-28 01:01:43 -04:00
Eugene Yokota c5bfc67750 Fixes test 2017-09-17 22:31:57 -04:00
Dale Wijnand 4f0d2f9ffd
Scalafmt 1.2.0 2017-08-14 15:47:52 +01:00
Dale Wijnand 805b76f3d4
Add back, re-configure & re-enable Scalafmt 2017-08-10 16:35:23 +01:00
Eugene Yokota efa3b1d340
Bump to latest io, scalajson, sjsonnew, contraband, util, lm, zinc 2017-07-06 11:05:24 +01:00
jvican 7b8e8cadf4
Execute macro tests in Travis 2017-05-25 18:39:24 +02:00
Eugene Yokota 2082f37e2a Rename Global as scope component to Zero
Fixes #3178

While working on the Scopes and Scope Delegation document, I noticed that the term Global in sbt is used for two different meaning.

1. Universal fallback scope component `*`
2. An alias for GlobalScope

This disambiguates the two by renaming ScopeAxis instance to Zero.
Since this is mostly internal to sbt code, the impact to the user should be minimal.
2017-05-08 11:41:48 -04:00
Eugene Yokota da046791e0 Apply Scalafmt formatting 2017-04-21 04:48:31 -04:00
Dale Wijnand 30bf72482b
Add test for a LM type
Use libraryDependencies which is a Seq[ModuleID]
2017-03-27 14:15:12 +01:00
Dale Wijnand 63fcca5543
Test setting query functionality 2017-03-27 14:15:10 +01:00
Dale Wijnand e67cd6948b
Fix a bunch but not all compile warnings 2017-03-03 01:33:44 +01:00
Dale Wijnand e83564a6b7
Move some server pieces from main-command to main 2017-01-20 17:07:25 +00:00
Eugene Yokota 39ad8cfb7d Revert "Unspecified project axis means current project or its build"
This reverts commit 4fea604759.
2017-01-16 13:37:21 -05:00
Eugene Yokota 7ddbd69e53 Use Scala 2.12.1
Bump up the Scala version used by sbt to 2.12.1.
Most changes are migration of the integration tests.
2017-01-15 20:49:14 -05:00
Eugene Yokota b34e182d21 Bump util, lm, and zinc 2017-01-14 00:57:46 -05:00
Eugene Yokota 9ee69e5dd4 Fix test 2017-01-06 11:27:41 -05:00
Dale Wijnand 43821667bf
Upgrade scalariform version 2016-12-11 12:13:11 +00:00
Dale Wijnand 1ba7bb0fb9 Merge pull request #2712 from Duhemm/fport/key-selection-build-level
Forward port #2469 & #2708
2016-09-01 09:23:01 +01:00
Martin Duhem faf6120c93 Unspecified project axis means current project or its build 2016-08-31 10:42:32 +02:00
kenji yoshida 27fe8eb6f7 remove unused imports (#2719) 2016-08-30 07:29:17 +01:00
Eugene Yokota 829ec4dd3a Update Defaults and scripted to := style 2016-08-29 23:02:10 -04:00
Dale Wijnand 96e086b1a1 AutoPlugin should require JvmPlugin by default
Fixes #2082
2016-07-08 10:57:55 +01:00
Dale Wijnand 12c2734052 Pattern match some if/else's 2016-07-07 18:21:25 +01:00
Dale Wijnand 32760bed55 Remove some fatal exception catching 2016-07-07 18:21:25 +01:00
Dale Wijnand 387674a451 Remove some heads and tails 2016-07-07 18:21:25 +01:00
Dale Wijnand 01a7a00915 Remove old sbt parser 2016-06-21 13:15:10 +01:00