Commit Graph

1815 Commits

Author SHA1 Message Date
Eugene Yokota 9655f50c55 bumping to zinc 1.0.0-X2 2016-08-30 21:37:20 -04: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
xuwei-k 857fc0f5da use JavaConverters instead of JavaConversions
- https://issues.scala-lang.org/browse/SI-9684
- 0c5b42d974
2016-08-30 01:31:04 +09:00
Martin Duhem 3da38b14db Fix key selection for build level keys
PR #2469 added build keys to tab completion, with the side effect of
considering as available candidate in key selection, thus making sbt
think that some inputs were ambiguous (e.g. `baseDirectory`): should it
apply to the current project or to the build level key?

This commit fixes this issue by improving the key selection:
 - If there's no candidate, we return the default key
 - If there's a single possible project level key, and zero or more
   build level keys, then we select the project level key.
 - If there are zero project level key, and a single build level key,
   then we select the build level key
 - If there are multiple candidates, sbt says that the input is
   ambiguous.

Fixes #2707
2016-08-26 08:14:28 +02:00
Martin Duhem 3c9d2ff57a 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-08-26 08:14:28 +02:00
kenji yoshida 0c086a7761 `aggregate` can now be used inside a .sbt file (#2683)
(cherry picked from commit b92e5773f7)
2016-07-27 23:35:16 +09:00
Dale Wijnand c5f59d4406 Check formatting with TravisCI
Fixes #2657
2016-07-18 12:58:30 -04:00
eugene yokota f221d0ab28 Merge pull request #2667 from OlegYch/fix-project-macro-error-message
Better error message from project macro
2016-07-18 11:29:26 -04:00
eugene yokota 4b0ccd2dab Merge pull request #2670 from dwijnand/remove-404-resolvers
Remove resolvers to repositories that don't exist
2016-07-18 11:10:18 -04:00
Dale Wijnand b245cf5f58 Remove resolvers to repositories that don't exist
Fixes #2195
2016-07-15 08:16:40 +01:00
eugene yokota 5abccaedd2 Merge pull request #2673 from dwijnand/leave-update-options-alone
Don't redefine updateOptions to ignore ThisBuild
2016-07-14 22:35:28 -04:00
Dale Wijnand 84c611af36 Remove unused vals/defs 2016-07-12 14:31:35 +01:00
Dale Wijnand 886d95c0e5 Don't redefine updateOptions to ignore ThisBuild
Fixes #2671
2016-07-12 13:24:14 +01:00
Dale Wijnand deea82542c Remove unused imports 2016-07-12 11:55:10 +01:00
OlegYch caba7e145c Better error message from project macro 2016-07-12 01:29:24 +03: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 4c75d778b9 Group imports 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
Eugene Yokota 246ec58e35 Adapting to Zinc changes 2016-06-26 03:55:37 +02:00
Grzegorz Kossakowski 824b59a3ef Adapt to changes to DefinesClass in zinc
The definition of `DefinesClass` has changed from being a function
`File => String => Boolean` to just a function `String => Boolean`. The
changes in this commit reflect that fact.

Also, this commit implements a newly introduced PerClasspathEntryLookup.
2016-06-26 03:49:55 +02:00
Grzegorz Kossakowski e8c5ff0ffe Remove use of `DefinesClass` in Load.scala
It turns out that `DefinesClass` was a dead data: it was passed around
but not used anywhere.
2016-06-26 03:49:55 +02:00
Dale Wijnand 01a7a00915 Remove old sbt parser 2016-06-21 13:15:10 +01:00
Dale Wijnand a0193d28ea Cleanup mainProj 2016-06-21 13:15:10 +01:00
Dale Wijnand ffafdc2e03 Remove OldPlugin 2016-06-21 08:09:30 +01:00
Dale Wijnand bf8c5d2135 Drop use of AttributeKey#rawLabel 2016-06-21 08:09:30 +01:00
Miles Sabin 1e9bb93285 Override scala organization and version transitively at the Ivy level 2016-06-05 09:46:00 +01:00
Pedro Larroy f5e8c8736f Fix typo: paralleism -> parallelism 2016-05-26 07:38:27 +00:00
James Roper e21c871d71 Replaced cross building support with sbt-doge 2016-05-17 09:49:16 +10:00
ekrich d383c2f306 Add Windows script support and native file extensions on Unix platforms
When running a sbt script, this change lets the user on UNIX and
Windows platforms to use native file extensions like none/.sh or
.bat/.cmd. The code copies the file to the sbt boot/hash/src_managed
directory with a .scala extension.
2016-05-13 12:01:14 -07:00
Eugene Yokota d437e8299e Typo fix 2016-05-07 20:31:19 -04:00
Eugene Yokota 420679df10 Address Codacy issues 2016-05-07 15:46:22 -04:00
Eugene Yokota 0cc9488632 Bring BuildStructure and others into internal 2016-05-06 19:21:13 -04:00
Eugene Yokota ce3926fbed Bring EvaluateConfigurations and DslEntry to internal 2016-05-06 17:32:26 -04:00
Eugene Yokota ee272d780e Reorganize directory structure 2016-05-06 16:01:49 -04:00
eugene yokota 6a9ced8eb6 Merge pull request #2589 from eed3si9n/wip/bumptozinc
[sbt 1.0] Bumping up to Zinc 1.0.0-M1
2016-05-06 05:40:58 -04:00
Eugene Yokota 60fa2b842a Renamed per review 2016-05-06 01:41:17 -04:00
Eugene Yokota f8ef449789 Fix test quick 2016-05-06 01:30:35 -04:00
Eugene Yokota 738e8fb2f3 Adjust discovery code to new Zinc 2016-05-05 16:11:57 -04:00
Eugene Yokota fd7c162ea8 Bumping up dependencies 2016-05-05 14:38:24 -04:00
Martin Duhem c70c9989e5 Upgrade to latest zinc 2016-05-04 16:44:31 +02:00
Eugene Yokota e3d2af9e40 We shouldn't cross publish sbt for backward compatibility
By keeping sbt artifact to be called sbt, the user can try by just
changing the build properties.
2016-05-04 00:09:02 -04:00
Eugene Yokota 89a17c79d6 Adjust to changes 2016-05-02 01:37:16 -04:00
Eugene Yokota 296758e159 Fix #2519. Fixes Maven Central getting included even with repo override 2016-05-01 03:19:34 -04:00
Eugene Yokota 78ea2932a4 Fixes #2427 inter-project dependency interference with sbt-web
sbt-web uses exportedProducts key as an extension point.
This removes exportedProductsAlways from 0.13.10-RC1,
and uses exportedProducts instead.
2016-05-01 02:59:06 -04:00
Eugene Yokota 447e2f7f8c Inter-project dependency tracking. Fixes #2266
Adds `trackInternalDependencies` and `exportToInternal` settings. These
can be used to control whether to trigger compilation of a dependent
subprojects when you call `compile`. Both keys will take one of three
values: `TrackLevel.NoTracking`, `TrackLevel.TrackIfMissing`, and
`TrackLevel.TrackAlways`. By default they are both set to
`TrackLevel.TrackAlways`.

When `trackInternalDependencies` is set to `TrackLevel.TrackIfMissing`,
sbt will no longer try to compile internal (inter-project) dependencies
automatically, unless there are no `*.class` files (or JAR file when
`exportJars` is `true`) in the output directory. When the setting is
set to `TrackLevel.NoTracking`, the compilation of internal
dependencies will be skipped. Note that the classpath will still be
appended, and dependency graph will still show them as dependencies.
The motivation is to save the I/O overhead of checking for the changes
on a build with many subprojects during development. Here's how to set
all subprojects to `TrackIfMissing`.

    lazy val root = (project in file(".")).
      aggregate(....).
      settings(
        inThisBuild(Seq(
          trackInternalDependencies := TrackLevel.TrackIfMissing,
          exportJars := true
        ))
      )

The `exportToInternal` setting allows the dependee subprojects to opt
out of the internal tracking, which might be useful if you want to
track most subprojects except for a few. The intersection of the
`trackInternalDependencies` and `exportToInternal` settings will be
used to determine the actual track level. Here's an example to opt-out
one project:

    lazy val dontTrackMe = (project in file("dontTrackMe")).
      settings(
        exportToInternal := TrackLevel.NoTracking
      )
2016-05-01 02:57:03 -04:00
Martin Duhem b086360046 Update bridge retrieval in `consoleProject`
Fixes sbt/sbt#2428
2016-05-01 02:49:11 -04:00
xuwei-k a6e31a0dc7 exclude directories from unmanagedSources
fix #2552
2016-04-30 11:13:02 +09:00
Eugene Yokota e4ee409cd5 Some changes due to cross publishing 2016-04-29 16:18:40 -04:00
Eugene Yokota 9e10f01363 Workaround for XML literal in build.sbt 2016-04-29 16:18:19 -04:00
eugene yokota b285cf114d Merge pull request #2575 from eed3si9n/wip/remove_plugin
[sbt 1.0] Rename sbt.Plugin => sbt.internal.OldPlugin
2016-04-29 03:54:00 -04:00
Eugene Yokota fddbf77877 Fix tests 2016-04-29 02:12:35 -04:00
eugene yokota d5fbe99bdd Merge pull request #2543 from eed3si9n/wip/project_dsl
[sbt 1.0] Reduce sbt.Project(...) params and make settings(...) lazy
2016-04-25 10:35:39 -04:00
Eugene Yokota f6ff1f916c Rename sbt.Plugin => sbt.internal.OldPlugin 2016-04-25 05:09:39 -04:00
Eugene Yokota a20da88a45 Reduce parameters from sbt.Project.apply 2016-04-25 04:26:30 -04:00
Dale Wijnand 60bc28829b Add Append & Remove instances for Option 2016-03-30 22:13:19 +01:00
Dale Wijnand f6c5be06b3 Drop sealed on Remove.Sequence 2016-03-30 22:13:19 +01:00
Eugene Yokota e57215e240 Fix test 2016-03-29 13:11:42 -04:00
Eugene Yokota d01f8d3c1b Port project/extra 2016-03-29 01:54:58 -04:00
Eugene Yokota 036e57c114 sbt.Build => sbt.internal.BuildDef
sbt.Load => sbt.internal.Load
2016-03-28 11:52:12 -04:00
Dan Sanduleac 6111156344 Fix CacheIvy as inclusions and exclusions were flipped :( 2016-03-07 13:45:17 +00:00
Dan Sanduleac 16f9ddba08 Add test for ModuleID format 2016-03-07 13:44:48 +00:00
Dan Sanduleac 3910d4d87a ModuleID's format should include the branch! otherwise we lose it... 2016-03-07 13:33:03 +00:00
Eugene Yokota e270d2bec1 Adjust to code reorganization. 2016-02-26 17:48:33 -05:00
Eugene Yokota 4d58714aa7 Adds CompatibilityWarningOptions. Fixes #2347
This addresses 0.13.10 regression, which currently warns users about
Maven incompatibility on a private configuration. This adds a config
class so the build user can control the level of the warning as well as
the target configuration to be monitored.
By default, we are only going to look at `Compile` and `Runtime`.
2016-02-26 17:46:12 -05:00
Eugene Yokota c1760fdc3c Move intransitive warning to update. Ref #2127 2016-02-26 17:40:07 -05:00
eugene yokota bdded0898d Merge pull request #2393 from dwijnand/fport/make-sbt-dotty-aware
FPORT: Make sbt aware of Dotty
2016-02-26 17:29:27 -05:00
Eugene Yokota b1b7430d9c Fixes #2464. Actually reorganize appResolvers
Fixes #2464 and Fixes #2465
appResolvers is a set of resolvers specified in the launcher
configuration.
This list fluctuates depending on the version of sbt, and sbt 0.13.10
meant to stabilize it by weeding out JCenter even when it includes it,
which failed when I applied the filter on the wrong list. This should
correct it.
2016-02-25 23:09:18 -05:00
Eugene Yokota cd373c99ad Add useJCenter setting, which is set to false. Fixes #2217
Adds a new setting `useJCenter`, which is set to `false` by default.
When set to `true`, JCenter will be placed as the first external
resolver to find library dependencies.

The implementation of `externalResolvers` is changed to incorporate the
setting by calling `Resolver.reorganizeAppResolvers`. These changes
were required because `externalResolvers` uses whatever that's in the
launchconfig, which the build user may not upgrade.
2016-02-25 23:02:16 -05:00
Martin Duhem 20d0c41473 Update to latest util, incrementalcompiler and librarymanagement 2016-02-24 16:54:03 +01:00
Dan Sanduleac abb53d4cb2 Fix for weird bug where sbt.librarymanagement's package object somehow conflicts with sbt.Keys.. Thanks Scala 2016-02-23 12:02:11 +00:00
Dan Sanduleac 978f2304e5 Stop deducing confs from classifier when delivering 2016-02-09 15:13:10 +00:00
Dan Sanduleac 63d657e9c0 [1/2] Add {source,doc}ArtifactTypes settings, use them in update* tasks in conjunction with ArtifactTypeFilter 2016-02-09 15:13:10 +00:00
Dan Sanduleac f11755e181 ModuleID + inclusions 2016-02-09 11:48:12 +00:00
Dan Sanduleac 7d2054f3ae ExclusionRule -> InclExclRule 2016-02-09 11:46:16 +00:00
Tim Harper 2eda2ebd46 bugfix - apply autoImports for global plugins at global configuration stage
Previously, the autoimports for globally defined plugins were not
imported for global configuration files, although they were imported for
project configuration files.

This patch causes an additional plugin discovery phase to happen during
global config evaluation, so that auto-plugins can be detected and their
imports subsequently included.
2016-01-18 21:43:32 -07:00
Guillaume Martres a05218f5ac 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.

Partial forward port of #2344.
2016-01-17 16:37:22 +00:00
Eugene Yokota 6c1b054249 Adds bootIvyConfiguration to grab compiler bridge source. Fixes #2336
Forward-port of #2337.

As described in #2336, I noticed that when using 0.13 nightly from
Bintray, sbt was unable to locate the compiler source.
Since `updateSbtClassifiers` is already set up to download sbt's own
sources, the `ivyConfiguration` should be reused. However, `compilers`
is a derived task, which is unable to depend on a scoped key.
To workaround this I had to create a new key called
`bootIvyConfiguration`. This should now use the metabuild's resolvers
to download the compiler bridge source.
2016-01-16 16:11:51 +00:00
Dale Wijnand c5949268ef Drop sealed from the typeclasses in Append
Forward port of #2322
2016-01-08 16:45:06 +01:00
eugene yokota a9d80cf38c Merge pull request #2281 from eamelink/bugfix-1982
Fix search result highlighting on Windows
2015-11-27 15:36:50 -05:00
xuwei-k 84e8f20080 fix typo 2015-11-25 20:01:22 +09:00
Erik Bakker 995ccf85a6 Fix search result highlighting on Windows
Use only ANSI color codes that are supported by Windows
2015-11-20 22:08:03 +01:00
Jesse Kinkead 0ecc2543ec Always export apiURL even if autoAPIMappings is false. 2015-11-04 10:51:54 -08:00
Eugene Yokota f14692f0b1 changes due to bumping up librarymangement to 0.1.0-M4 2015-10-02 00:25:45 -04:00
Eugene Yokota 814ceeab79 librarymanagement 0.1.0-M3 to use internal syntax 2015-10-01 23:28:27 -04:00
Eugene Yokota 9eb718ae45 Fixes actions/depends-on 2015-10-01 01:57:02 -04:00
Martin Duhem 72edbfa177 Create `object Import` for source compat 2015-09-29 19:16:45 -04:00
Eugene Yokota cda5ff84c7 Use the new Doc object from incrementalcompiler 2015-09-28 22:56:34 -04:00
Martin Duhem a2abb6eeb6 Update to latest version of incremental, fix imports 2015-09-16 10:16:03 +02:00
Eugene Yokota ba7ffa5d4d Fix compiler bridge name 2015-09-15 03:06:35 -04:00
Eugene Yokota bb8133eaba use incremental compiler version instead of sbt version 2015-09-14 23:43:32 -04:00
Eugene Yokota 21a027c487 Fix Compiler.compilers 2015-09-14 21:59:36 -04:00
Eugene Yokota 076ccd7b90 Merge 2015-09-14 10:54:22 -04:00
Martin Duhem c981abd295 Fix all imports 2015-09-14 14:28:09 +02:00
eugene yokota 57321bf6bc Merge pull request #2192 from DavidPerezIngeniero/0.13
More robustness when using the tasks and settings command
2015-09-10 21:14:57 -04:00
Martin Duhem 92ea782d94 Fix deprecation messages 2015-09-04 12:25:59 +02:00
Martin Duhem 1c4a900ff5 Retrieve compiler bridge sources in temp directory
Note that they won't be downloaded again, because the component compiler
will look for a previously-compiled version of the compiler bridge
before trying to fetch the sources again. If they've already been
downlaoded, then they have been compiled and a compiled version of the
compiler bridge already exists.
2015-09-04 12:00:44 +02:00
Martin Duhem dcad8a5527 Specify the compiler bridge module in a setting
In order to restore reproducibility of builds, we no longer cascade over
the possibly available versions of the compiler bridge sources (a
specific version of the bridge sources may not be available one day, but
exist on the next day), but rather let the build definition configure
which module to use.

Fixes sbt/sbt#2196
2015-09-04 11:17:27 +02:00
David Perez 1e2617a807 More robustness when using the tasks and settings command 2015-09-01 14:16:41 +02:00
Martin Duhem e31a9ba456 Download compiler interface sources in boot directory 2015-08-26 10:33:11 +02:00
Dale Wijnand 13c6729507 Extract Def.settings from Project#settings.
This allows for the same functionality that using SettingsDefinition in
Project#settings allows (specifying either bare Setting[_] or a Seq[Setting[_]])
to be available outside of the settings for a project, for instance when
defining a val.

In short, it allows:

    val modelSettings = Def.settings(
      sharedSettings,
      libraryDependencies += foo
    )
2015-08-20 18:45:41 +01: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
Josh Suereth 4464b13acd Remove reference to dead servers. 2015-07-24 13:58:39 -04:00
Josh Suereth d0e918d6d3 Merge pull request #2114 from pdalpra/add-append.sequence-list
Add an Append.Sequence instance for List
2015-07-18 07:05:59 -04:00
Pierre DAL-PRA 10c71b3f8a Add an Append.Sequence instance for List, fixes #2107 2015-07-18 10:51:31 +02:00
Pierre DAL-PRA f944ec98d2 Log javaOptions/fork interactions:
- When forking, log the javaOptions that are used
- When javaOptions are defined but fork := false, warn that javaOptions
	will be ignored
2015-07-18 00:37:35 +02:00
eugene yokota 5824ef6d7f Merge pull request #2106 from Duhemm/interface-specific-sources-clean
Find most specific version of compiler interface sources
2015-07-17 10:25:16 -04:00
Pierre DAL-PRA 13b37cc987 Fix several warnings 2015-07-17 09:17:42 +02:00
Martin Duhem cbd5cd5875 Fix inlined method 2015-07-16 15:34:04 +02:00
Martin Duhem 90a8423d8e Find most specific version of compiler interface sources
This commit introduces a mechanism that allows sbt to find the most
specific version of the compiler interface sources that exists using
Ivy.

For instance, when asked for a compiler interface for Scala 2.11.8-M2,
sbt will look for sources for:

 - 2.11.8-M2 ;
 - 2.11.8 ;
 - 2.11 ;
 - the default sources.

This commit also modifies the build definition by removing the
precompiled projects and configuring the compiler-interface project so
that it publishes its source artifacts in a Maven-friendly format.
2015-07-16 11:18:48 +02:00
Josh Suereth d2fdfb81a0 Merge pull request #2091 from Duhemm/hide-stacktrace
Don't show the stack trace on compilation error in build definition
2015-07-09 14:26:03 -04:00
Pierre DAL-PRA cf72c7cc0e Fix a few typos in keys descriptions 2015-07-09 17:00:48 +02:00
Martin Duhem 6c123f22ba Hide stacktrace on compilation error in build definition 2015-07-09 11:40:02 +02:00
Jonas Fonseca 54618ad55a Fix typos in annotations referring to EvaluateTaskConfig 2015-07-01 09:22:15 -04:00
Eugene Yokota 81f175ddbf Fixes #1666 2015-06-20 00:51:42 -04:00
James Roper 3625ce5943 Added Extracted.runInputTask
This provides a convenience function for running an input task from the
extracted state. This is particularly useful for commands, release steps
etc that may want to run input tasks, like scripted.
2015-06-10 16:09:09 +02:00
Andrew Johnson 7c0f455c79 Use FiniteDuration to represent time rather than a long 2015-05-13 14:18:27 -04:00
Andrew Johnson 4ec092617f Add forceUpdateMs 2015-05-13 08:02:48 -04:00
Josh Suereth b568565615 Merge pull request #1970 from matthewfarwell/test-exclude
Test exclude
2015-05-11 15:27:06 -04:00
eugene yokota c1952698e4 Merge pull request #2000 from dwijnand/command-to-string
Implement SimpleCommand.toString. Fixes #1998.
2015-05-07 10:45:16 -07:00
Eugene Yokota 66e07f6e83 use Duration to track minForcegcInterval 2015-05-05 19:29:22 -04:00
Dale Wijnand 97ed5822c7 Implement SimpleCommand.toString. Fixes #1998. 2015-05-05 09:11:52 +01:00
Eugene Yokota 8aca4e8fa6 Force GC on cross building 2015-05-04 23:49:36 -04:00
Eugene Yokota 2bbe872969 Use interval throttling
JMX doesn't seem to work in reporting

    memoryMxBean.getObjectPendingFinalizationCount

At least for the test build that I used it always reports zero.
2015-05-04 23:09:23 -04:00
Eugene Yokota d82fe46052 Fixes #1223. Uses JMX to find out when to force GC. 2015-04-30 14:53:50 -04:00
eugene yokota 1ebe3804b3 Merge pull request #1992 from dwijnand/cross-scala-versions-default
Fix crossScalaVersions default, derived from scalaVersion. Fixes #1828.
2015-04-29 05:08:40 -07:00
eugene yokota 27bd275343 Merge pull request #1989 from dwijnand/inThisBuild
Add inThisBuild, similar to inConfig. Fixes #1847
2015-04-26 18:58:12 -07:00
eugene yokota d0fbd10852 Merge pull request #1987 from ajsquared/0.13
Add configurationsToRetrieve
2015-04-26 18:54:32 -07:00
Dale Wijnand 116c1e1e8b Fix crossScalaVersions default, derived from scalaVersion.
Fixes #1828.
2015-04-26 17:06:59 +01:00
Dale Wijnand 1aff36d505 Add help message for `inspect actual`. Fixes #1651. 2015-04-26 03:18:29 +01:00
Dale Wijnand 348a28f761 Cleanup inspectDetailed. 2015-04-26 02:31:51 +01:00
Dale Wijnand 677c33611a Add inThisBuild, similar to inConfig. Fixes #1847 2015-04-25 20:39:59 +01:00
Andrew Johnson b617b41ae1 Support configuring a subset of configurations from which to retrieve dependencies when retrieveManaged is true 2015-04-23 12:49:45 -04:00
Matthew Farwell d4cffdddd9 corrected exclusion logic, added more unit tests & scripted tests 2015-04-17 09:28:58 +02:00
Matthew Farwell 0e56878534 Added unit tests for Defaults.selectedFilter 2015-04-14 06:31:27 +02:00
Matthew Farwell a9e06109a3 Added exclusions to testOnly and testQuick command line, indicated by a '-' prefix. 2015-04-13 16:31:22 +02:00
eugene yokota c879432b0f Merge pull request #1950 from ajsquared/0.13
Add retrieveManagedSync
2015-04-10 12:48:17 -07:00
Andrew Johnson e647234743 Add retrieveManagedSync 2015-03-31 10:59:41 -04:00
Dale Wijnand 5c2ec63fa6 Make use of the nicer Project settings syntax in 0.13.8. 2015-03-27 01:19:26 +00:00
David Perez 4b5a3b785e Merge remote-tracking branch 'upstream/0.13' into 0.13 2015-03-25 16:12:54 +01:00
David Perez ef6c5f7e55 Merge remote-tracking branch 'origin/0.13.7' into 0.13 2015-03-25 16:01:15 +01:00
David Perez 5ce11c67c5 Catch exceptions with NonFatal 2015-03-25 15:02:45 +01:00
David Perez 2c52efeca5 Removed unicode arrow 2015-03-25 13:14:48 +01:00
David Perez 79ef772219 Removed unicode arrow 2015-03-24 14:54:10 +01:00
Dale Wijnand a4d2e04532 Add explicit return type for implicit removeSeq. 2015-03-23 22:29:57 +00:00
Dale Wijnand 18c7a5c226 MAke Task's remove1/removeN final. 2015-03-20 16:34:13 +00:00
Dale Wijnand 1db6f7f316 s/remove/removed/ 2015-03-20 16:12:39 +00:00
Dale Wijnand 17a1179e5b Add -= & --= for setings & keys, dual of += & ++=. 2015-03-16 23:44:38 +00:00
Dale Wijnand 51e83e7ea4 Fix temp variable names for +=/++= macros. 2015-03-16 23:31:14 +00:00
David Perez 508fc1b5ec Issue 1900, more robustness in help system 2015-03-12 15:30:43 +01:00
Eugene Yokota 1891b52472 Roll back the use of sbt/serialization for update caching 2015-03-10 05:12:17 -04:00
Eugene Yokota ca9257c064 OOM handling. #1763 2015-03-09 21:22:58 -04:00
Eugene Yokota b70fa6e0c2 Use pickler to cache UpdateReport for update task. #1763 2015-03-09 21:22:58 -04:00
Dale Wijnand a058a38b7b Define Project.settings with SettingsDefinition.
This maintains old, existing ways of configurating project settings,
while adding the possibility to:
* Define add a sequence of settings, between other individual settings
* Pass a Seq[Setting[_]] to Project.settings without having to do
  "varargs expansion", ie. ": _*"
2015-03-06 17:33:54 +00:00
Eugene Yokota b40a9e79c8 Fixes per review 2015-02-25 00:54:03 -05:00
Eugene Yokota 30ca290a13 Add sbt.root.ivyplugin escape hatch 2015-02-25 00:22:26 -05:00
Eugene Yokota 162ed3f320 Fixes #1869, Ref #1871. Don't enable IvyPlugin for multi project generated root 2015-02-24 23:02:26 -05:00
Dale Wijnand d07cdb92ad Make sure bare build.sbt is published by default. 2015-02-24 23:02:26 -05:00
Dale Wijnand 58a2e634e2 Improve disabling publish artificial root.
Not only is this safer, it also disables delivering the ivy file.
2015-02-24 23:02:25 -05:00
Dale Wijnand 03dc3f6fd0 Disable publishing artificial root. 2015-02-24 23:02:25 -05:00
Simon Schäfer 9a51264c96 Fixes #1845. Reformat Scaladoc of `AutoPlugin`
Enumerations always need to start with the same number, otherwise
Scaladoc doesn't recognize them as enumeration (no idea why).

Code blocks need to be surrounded by {{{}}}. The indentation of the
larger code block is still not correctly displayed, but I couldn't find
out why.

A TODO comment is moved out of the Scaladoc comment.
2015-02-07 01:35:35 +01:00
eugene yokota 35214ba202 Merge pull request #1841 from sbt/wip/merge-notes
Merging notes
2015-02-03 17:00:09 -05:00
Eugene Yokota f42419bdd4 Adds addMavenResolverPlugin. #1808/#1793 2015-02-02 14:57:25 -05:00
eugene yokota 1a3062ed10 Merge pull request #1799 from indrajitr/cross-source
Enable cross-version support for Scala sources.
2015-02-02 13:09:54 -05:00
eugene yokota 58f90cd078 Merge pull request #1787 from xuwei-k/git-clone-depth
specify the "--depth" parameter for efficient when git clone
2015-02-02 10:46:35 -05:00
Eugene Yokota b0a10815a6 Implementes `Def.sequential`. Fixes #1001
Adds Def.sequential based on Mark's implementation provided in #1001.
2015-01-20 01:22:03 -05:00
Indrajit Raychaudhuri 1f90ef6b43 Fix params order in `@deprecated` 2015-01-17 08:25:57 +05:30
Indrajit Raychaudhuri 1b15653bcb Enable cross-version support for Scala sources.
This allows attaching unmanaged sources on `per-ScalaVersion` basis.

Sources from `src/{main,test}/scala-<scalaBinaryVersion>` is collected
in addition to `src/{main,test}/scala` by default.

Note that the treatment of `scalaBinaryVersion` would vary depending on
`scalaVersion` pre-2.10 and 2.10 onwards.

For example:
- with `scalaVersion` `2.9.3`, the `scalaBinaryVersion` is set to `2.9.3`
  thus the files in `src/{main,test}/scala-2.9.3` as well
 `src/{main,test}/scala` would be available in the `sources` list.

- with `scalaVersion` `2.10.1`, the `scalaBinaryVersion` is set to `2.10`
  thus the files in `src/{main,test}/scala-2.10` as well
 `src/{main,test}/scala` would be available in the `sources` list.
2015-01-16 14:07:42 +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
Josh Suereth 42424b4cdb Refactoring code.
* remove debugging statements
* Move each class so it's one name-per-file
* Migrate out of org.apache namespace into sbt.mavenint
2015-01-12 14:48:23 -05:00
Eugene Yokota 406c80ddd6 Adjust tests. 2015-01-10 22:55:50 -05:00
Josh Suereth 16a64d70ef Migrate pom extra attributes out of CustomPomParser for deprecation. 2015-01-09 14:14:40 -05:00
Josh Suereth e3931dbfec Create a new Ivy DependencyResolver which uses Aether.
* Here we wire Aether into the Ivy dependency chain
* Add hooks into Aether to use Ivy's http library (so credentials are configured the same)
* Create the actual Resolver which extracts metadata information from Aether
* Deprecate old Ivy-Maven integrations
* Create hooks in existing Resolver facilities to expose a flag to enable the new behavior.
* Create notes documenting the feature.
* Create a new resolver type `MavenCache` which denotes how to read/write local maven cache metadata
  correctly.  We use this type for publishM2 and mavenLocal.
* Update failing -SNAPSHOT related tests to use new Aether resolver
* Create specification for expected behavior from the new resolvers.

Known to fix #1322, #321, #647, #1616
2015-01-08 08:53:25 -05:00
xuwei-k ad9e71178a specify the "--depth" parameter for efficient when git clone 2014-12-24 01:39:02 +09:00
Josh Suereth c8fc6d0223 Merge pull request #1620 from sbt/fix/1620
sbt resolves dependencies every compile when using %% with dependencyOverrides
2014-12-15 16:04:18 -05:00
Josh Suereth 62658b5fd8 Merge pull request #1615 from sbt/fix/1615
0.13.6 eviction notices too noisy
2014-12-15 15:13:02 -05:00
Eugene Yokota 5199909be7 Fixes #1766. Removes "No main class detected" warning. 2014-12-13 00:05:55 -05:00
Eugene Yokota 46f56851d4 'evicted' task to display all evictions 2014-12-12 23:30:05 -05:00
Eugene Yokota 40e5f7538a Fixes #1615. Move the invocation of eviction warning.
This moves the invocation of eviction warning so it’s called only when
actual ivy update is being performed.
2014-12-12 17:46:19 -05:00
Eugene Yokota e17ab305ae Fixes minor mistake in #1748 2014-12-12 17:00:35 -05:00
eugene yokota 9fc174f5c5 Merge pull request #1765 from ajozwik/0.13
Rollback xml parsing work-around
2014-12-12 12:14:31 -05:00
andrzej.jozwik@gmail.com e8e0297967 Remove work-around for parsing xml by scala parser 2014-12-08 23:35:17 +01:00
Eugene Yokota 59121cddf7 Fixes #1620. Fixes Set[ModuleID] serialization that broke update cache. 2014-12-08 09:27:56 -05:00
Josh Suereth 71d5dc931e Merge pull request #1748 from sbt/wip/1748
excludeDependencies: excludeAll at the project level
2014-12-05 09:06:09 -05:00
eugene yokota 4aa44262c3 Merge pull request #1741 from ajozwik/0.13
Multi imports in one line
2014-12-05 05:28:28 -05:00
Eugene Yokota 07afc67c7a Adds excludeDependencies. Fixes #1748
Adds project-level dependency exclusions:

  excludeDependencies += "org.apache.logging.log4j"
  excludeDependencies += "com.example" %% "foo"

In the first example, all artifacts from the organization
`"org.apache.logging.log4j"` are excluded from the managed dependency.
In the second example, artifacts with the organization `"com.example"`
and the name `"foo"` cross versioned to the current `scalaVersion` are
excluded.
2014-12-04 17:35:30 -05:00
Josh Suereth fda9252250 Merge pull request #1752 from sbt/wip/1752
Cached resolution is too verbose
2014-12-04 17:09:34 -05:00
Eugene Yokota 607b686cb2 Fixes #1752. Fixes cached resolution too verbose.
- Fixes cached resolution being too verbose
- Adds new UpdateLogging named "Default"
- When global logLevel or logLevel in update is Debug, Default will
bump up to Full UpdateLogging.
2014-12-04 12:34:30 -05:00
Jean-Rémi Desjardins ca736e55d3 Minor code cleanup 2014-12-03 09:56:34 -08:00
Josh Suereth f0adf92345 Fixes @eed3s1gn's comments
* Use verbs.
* compile actually saves the analysis
* previousCompile loads previous anlaysis
* explicit task to override for bytecode manipulation folkel.
2014-12-01 15:20:17 -05:00
Josh Suereth 59ba35ce90 Finish rearchitecting.
* IncrementalCompiler IC object now holds the actual logic to start incremental compilation (rather than AggresiveCompiler or other)
* MixedAnalyzingCompiler ONLY does anlaysis of Java/Scala code
* Moved the AnalyzingJavaCompiler into the integration library so that necessary dependencies are visible.
2014-12-01 13:35:51 -05:00
Josh Suereth 067479f59e Debug issues with implicit usage for CompileSetup.
* Force CompileSetup Equiv typeclass to use Equiv relations defined locally.
* Add toString methods on many of the incremental compiler datatypes.
* Remove remaining binary compatibility issues in Defaults.scala.
2014-12-01 13:35:51 -05:00
Josh Suereth 045ac1d984 Tweak remaining binary compatibility issues with design. 2014-12-01 13:35:51 -05:00
Josh Suereth 40bf599f4a Deprecating old APIs and attempting to document behavior correctly.
* Removed as many binary incompatibilities as I could find.
* Deprecating old APIs
* Attempt to construct new nomenclature that fits the design of Incremental API.
* Add as much documentation as I was comfortable writing (from my understanding of things).
2014-12-01 13:35:51 -05:00
James Roper 0f784ab101 Allow bytecode enhancement to update analysis
This breaks the loading/saving of the incremental compiler analysis out
into separate task, thereby providing the necessary hooks for byte code
enhancement tasks to enhance bytecode and update the analysis before the
analysis gets stored to disk.
2014-12-01 13:35:50 -05:00
Josh Suereth e2942f167b Merge pull request #1740 from j-keck/0.13
fix typo
2014-12-01 10:09:01 -05:00
j-keck 2e8c98f1a4 filter out hidden files 2014-11-24 06:34:56 +01:00
j-keck f6c8faa992 fix typo 2014-11-23 13:59:42 +01:00
andrzej.jozwik@gmail.com ce75c5a9b0 For backward compatibility - do not used duplicated imports 2014-11-21 09:11:09 +01:00
andrzej.jozwik@gmail.com d9aadaf1e1 Multi import in one line 2014-11-20 23:10:03 +01:00
Peter Vlugter 5704e31256 Fix sbinary cache limit when caching doc inputs
Cache the classpath as Seq[File] rather than String in RawCompileLike.
2014-11-19 14:41:17 -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 75402b26f2 More fixes from review.
* Fix regex for end of line.
* Rename NewJavaTool and friends to remove the New.
2014-10-30 19:37:22 -04:00
eugene yokota 473fc8476d Merge pull request #1703 from sbt/wip/merge-0.13.7
Wip/merge 0.13.7
2014-10-29 21:36:36 -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
Tomasz Bartczak 96f57f9fcd Fix for sbt#1180 - discovered classes are now sorted 2014-10-27 21:31:03 +01:00
Josh Suereth 2d3f57ad51 Fix the run logic so the mainClass setting is actually used when set. 2014-10-25 14:25:30 -04:00
Josh Suereth b834be8bfa Merge pull request #1669 from kretes/1648-warn-about-main-classes
Fix for https://github.com/sbt/sbt/issues/1648 - warn about multiple or no main classes
2014-10-23 07:37:07 -04:00
Eugene Yokota 7827682f41 Remove DefDef and check rhs
- lhs pattern matching occurs only for vals.
- def also breaks due to proc notation.
- instead of pretty printing, we can just check rhs.
2014-10-22 19:14:47 -04:00
Tomasz Bartczak 7a1a21d8c8 Fix for sbt#1648 - warn when no or multiple main classes 2014-10-22 22:42:01 +02:00
Eugene Yokota 97584457fa merged #1662 2014-10-21 12:18:54 -04:00
andrzej.jozwik@gmail.com 6f9dfcce52 Revert brackets for backward compatibility (binary compatibility), addExplicitXmlContent use pattern matching, splitFile - does not return whitespace statements 2014-10-19 23:54:18 +02:00
andrzej.jozwik@gmail.com 8c0e400c11 Add ; instead of brackets to xml group 2014-10-17 22:23:20 +02:00
andrzej.jozwik@gmail.com ef74db7319 Revert to previous version. 2014-10-14 11:24:12 +02:00
andrzej.jozwik@gmail.com ddc80357dc Add scala-stm file for unit test. 2014-10-14 08:30:20 +02:00
andrzej.jozwik@gmail.com 50ed84b748 Use original function 2014-10-13 22:53:45 +02:00
andrzej.jozwik@gmail.com f1ab893f98 Fixed #1666 - check from last end of line. 2014-10-13 22:49:26 +02:00
Josh Suereth d7c76aabf1 Merge pull request #1663 from sbt/wip/avoid-deprecated
enable -deprecation for Scala 2.10
2014-10-12 12:31:08 -04:00
Josh Suereth 5599b53692 Merge pull request #1653 from sbt/wip/fix-1649
Fixes #1649. Exclusion rules and other cached resolution fixes
2014-10-12 12:01:22 -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
Josh Suereth ddf8a173b0 Disable pattern matching in val syntax in sbt 0.13.7.
Fixes #1661 or at least works around it for now.
2014-10-10 13:47:02 -04:00
Eugene Yokota 8ddff28a9e Fixes #1660
Provide overloads for transitiveScratch and updateClassifiers that work
with IvyActions.updateEither.
2014-10-10 00:34:05 -04:00
Eugene Yokota 09bca754b5 Fixes #1639. Fixes cached resolution interacting with force()
When conflicts are found for a given module, a forced one
is selected before conflict manager kicks in.
The problem is that DependencyDescriptor seems to mark transitive
forced dependency as forced as well,
so the actual forced dependency are sometimes not prioritized.
To work around this, I’ve introduced a mixin called
SbtDefaultDependencyDescriptor, which carries around ModuleID to detect
direct dependencies.
2014-10-09 13:11:13 -04:00
Josh Suereth 89a3e4982f Add escape hatch to old parser in case we run into problems.
Just make sure users have the means to still build in case there's any
issues we missed.  This code should be removed in sbt 1.0.
2014-10-08 15:00:48 -04:00
eugene yokota 0f2c6f89a1 Merge pull request #1645 from sbt/wip/no-blankies-rebased
Natural whitespace handling for SBT configuration parser AKA 'no more blankies'
2014-10-06 14:27:50 -04:00
Eugene Yokota 5afb9e1af7 Fixed json serialization turning license into {}. 2014-10-05 04:24:22 -04:00
Josh Suereth 009426d896 Documentation and renaming of "blankies" into somethign a bit easier to find.
* Rename SPlitExpression* to `SbtParser` denoting that is parses .sbt files
* Adds a few todos
* Document APIs for internal usage.
2014-10-03 14:22:52 -04:00
andrzej.jozwik@gmail.com e230a17d3b @deprecated("Removed from the public API", "2.11.0") def isDefined: Boolean 2014-10-03 14:22:52 -04:00
andrzej.jozwik@gmail.com a67c5fd187 Comments #1630 2014-10-03 14:22:52 -04:00
andrzej.jozwik@gmail.com 97a96d5bf8 Split to small methods 2014-10-03 14:22:52 -04:00
andrzej.jozwik@gmail.com dac3edb546 Split to small methods 2014-10-03 14:22:52 -04:00
andrzej.jozwik@gmail.com 963e75d182 Fixed #1630. Remove last line if last statement is being removed 2014-10-03 14:22:52 -04:00
andrzej.jozwik@gmail.com 2a603da0a8 Moved tests to internal package 2014-10-03 14:22:52 -04:00
andrzej.jozwik@gmail.com 9294351e24 #1628 2014-10-03 14:22:52 -04:00
Josh Suereth 48be806dd4 Adding scaladoc commnets for SessionSettings, and fixing type in check file. 2014-10-03 14:22:51 -04:00
Josh Suereth a8370880e0 Remove binary compatibility breakages and migrate new parser features into an internal package. 2014-10-03 14:22:51 -04:00
andrzej.jozwik@gmail.com 2019c6da62 findMissingText now searchs recursive 2014-10-03 14:22:51 -04:00
andrzej.jozwik@gmail.com 742188393b Cut valid text corrected 2014-10-03 14:22:51 -04:00
andrzej.jozwik@gmail.com 232c28ecd1 Handle xml content in session save 2014-10-03 14:22:51 -04:00
andrzej.jozwik@gmail.com c720a973a6 Corrections for "session save" 2014-10-03 14:22:51 -04:00
andrzej.jozwik@gmail.com 4a33fd2225 Extract method - for new implementation. Not completed yet. 2014-10-03 14:22:51 -04:00
andrzej.jozwik@gmail.com eab7049479 Comments fixed #1574 2014-10-03 14:22:51 -04:00
andrzej.jozwik@gmail.com 8da8fefc68 Natural whitespace handling for SBT configuration parser AKA 'no more blankies' 2014-10-03 14:22:51 -04:00
Eugene Yokota fe8d290c17 Implemented cached resolution (minigraph caching) 2014-09-29 17:33:37 -04:00
Jacek Laskowski 627956901b Small scaladoc fixes 2014-09-28 23:27:59 +02:00
Josh Suereth d865251686 Add workaround (and warning message) for when ChainResolver gets a null publication date while we investigate other issues.
* Attempt to set publication date to last modified time, if the stars align
* Issue warning about undefined resolution behavior otherwise
* Add scripted test which exercises the NPE issue in resolving -SNAPSHOTs.
* Commit scalariform style edit in Act.scala

* After parsing and transforming the pom, check for pub date.
* If we don't have a pub date, try to grab lastModified from the URL
* If we can't do anything, issue a warning about the problem artifact.
2014-09-24 18:23:15 -04:00
Josh Suereth d2a18926b0 Merge pull request #1613 from jedesah/topic/remove-warnings
Remove compiler warnings
2014-09-24 09:10:35 -04:00
Jean-Rémi Desjardins 2eb8fd1b8a Merge branch '0.13' of github.com:sbt/sbt into 0.13 2014-09-16 09:20:21 -07:00
Jean-Rémi Desjardins b754c04a30 Add missing default option 2014-09-15 10:02:08 -07:00
Antonio Cunei 9b94a16b73 Undone the revert on the optimization, and fixed setAll()
The optimization, and therefore the change in the behavior
of Relation, is now needed by the class Logic, and cannot
be reverted.

This patch (written by Josh) therefore changes the
implementation of setAll() so that _1s is no longer used.
2014-09-12 20:51:04 +02: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 3ea995225f Merge branch '0.13' of github.com:sbt/sbt into 0.13 2014-09-10 22:56:01 -07:00
Jean-Rémi Desjardins ced5230289 Remove some compiler warnings 2014-09-10 22:55:43 -07:00
Jean-Rémi Desjardins 183c2bcfe2 Add developers keySetting
The motivation for this is mainly to avoid having to define a pomExtra to publish to Maven central
2014-09-10 20:18:28 -07:00
Josh Suereth 0f88b7a4f3 Merge pull request #1584 from sbt/wip/fix-test-classloader-issues
Fix issues with specifying scalaHome/scalaInstance and running tests
2014-09-10 12:26:15 -04:00
Josh Suereth fa36d0e290 Add missing `configs` method from Project to the build.sbt DSL.
* Create `configs` method for the sbt DSL
* Add ProjectManipulation for this method to implement.
2014-09-09 08:54:43 -04:00
Josh Suereth 9a60ca7da9 Merge pull request #1579 from copumpkin/0.13
Support publishing to file repositories specified in ~/.sbt/repositories. Fixes #1570
2014-09-08 13:24:25 -04:00
Daniel Peebles a857ae2759 Fixes #1570 2014-09-08 00:55:58 -04:00
Josh Suereth bc421f0ac9 Fix issue where generated config-classes was not propogated.
Fixes #1568.

This is the fallout of attempting not to leak config-file classes. Since
we DO NOT have valid incremental compiler for config-classes, we've instituted
workaround to ensure that regular incremental compilation *AND* our own
sbt loader do not hose each other.   A full solution will eventually be
to find a way for .sbt files to participate in regular compilation of a
project.

For now, we fix the tracking of generated.class files throughout an sbt
"loadProjects" call, and then clean any .class files that were not
generated for a full reload.   This commit just fixes
a minor tracking issue.
2014-09-07 12:01:50 -04:00
Havoc Pennington b202bd6848 Merge pull request #1538 from sbt/fix/1439
Fixes #1439. Fixes metabuild downloading unused Scala 2.10.2
2014-08-20 14:26:02 -04:00
Eugene Yokota e2412740b2 Removes println when removing unused *.class files.
#1525 removes unused *.class files created by the metabuid.
The implementation currently prints out a long list of *.class files
it’s about to remove. Unless something bad happens, this information is
not very useful to the user, so I suggest we don’t display it.
2014-08-18 01:12:39 -04:00
Eugene Yokota 8a069d0fb2 Fixes #1439. Fixes metabuild downloading unused Scala 2.10.2
Scala instance is added to the Ivy graph via autoLibraryDependency.
For metabuilds, scala-library is scoped under “provided” configuration,
which does not seem to evict modules on “compiled” configuration.
This commit turns overrideScalaVersion flag to true for the metabuilds,
so override rules are added for the following modules:
- scala-library
- scala-compiler
- scala-reflect
2014-08-17 23:18:32 -04:00
Eugene Yokota 074fbdb9e6 ModuleDetailReport => OrganizationArtifactReport
ModuleDetailReport hasn’t been released yet, so this rename is safe.
2014-08-15 01:57:21 -04:00
Josh Suereth a1b3117a42 Track generated .class files and clean leftovers after project load.
Fixes #1524

* Track generated .class files from Eval
* While loading, join all classfiles throughout Load, lots of bookkeeping.
* When a given build URI is done loading, we can look at its
  project/target/config-classes directory and clean out any extra items
  that are lingering from previous build definitions.
* Add TODOs to handle the same thing in global directories.  Right now,
  given the shared nature of these projects, it's a bit too dangerous to
  do so.
2014-08-14 10:03:24 -04:00
Josh Suereth 0bfb5a4118 Ensure random file hash for .sbt DSL doesn't conflict across .sbt files.
Fixes #1465
2014-08-14 10:01:02 -04:00
Grzegorz Kossakowski 12b6bd148d Merge pull request #1531 from gkossakowski/positions-crash
Set currentRun and currentUnit in Eval
2014-08-14 15:52:01 +02:00
Grzegorz Kossakowski 3fa6b87319 Set currentRun and currentUnit in Eval
First of all, we revert changes to Eval made in
a9cdd96152. That was a work-around
for problem with broken positions set on some trees. The rest of
the commit describes a fix.

Scala compiler's Global has `currentRun` method which is supposed to
return an instance of Run currently in use. Sbt's Eval which wraps
Global would create an instance of Run but not register it in Global.
Similarly, Eval would create an instance of `CompilationUnit` but not
set it in Run.

This would result in some silent failures like assigning broken positions
to parsed trees even if parser *has* received an instance of compilation
unit. See https://issues.scala-lang.org/browse/SI-8794 for details.

We fix the issue by subclassing Global and making it possible to set
current Run instance externally. Then we use this capability to set a run
instance right before we call compiler phases. We also make sure that
current run has current compilation assigned to it.

Fixes #1181
Fixes #1501
Fixes #1523
2014-08-13 23:32:14 +02:00
Josh Suereth 86d0cd9aeb Remove printlns. 2014-08-11 09:04:26 -04:00
Eugene Yokota b8ab638b74 So apparently scalariform was unable to parse these files. 2014-08-11 09:03:35 -04:00
Josh Suereth 2d0aafc8b0 Allow root plugins to be disabled.
Fixes #1455

* Add a mechanism to detect if a plugin clause includes/excludes
  a particular plugin.
* Add a filter for our "enabling" clauses so that user-excluded
  root plugins do not show up.
* Add a test to ensure this succeed.
2014-08-11 09:01:18 -04:00
Josh Suereth f7c4898a97 Merge pull request #1491 from sbt/fix/528
Unresolved dependency warning includes source position. Fixes #528
2014-08-11 07:51:33 -04:00
Josh Suereth fbf9d72607 Merge pull request #1509 from sbt/fix/1501
Fixes #1181/#1501. Fixes ArrayIndexOutOfBoundsException: -1
2014-08-08 13:39:01 -04:00
eugene yokota d99d75408c Merge pull request #1505 from jaceklaskowski/initdetailed-help-fix
BuiltinCommands.initialize has load-commands commented out
2014-08-08 10:31:34 -04:00
Eugene Yokota 840acba087 Adds `dependencyPositions` task to explicitly track dependency positions. 2014-08-08 00:53:09 -04:00
Eugene Yokota a9cdd96152 Fixes #1181/#1501. Fixes ArrayIndexOutOfBoundsException: -1
When the compiler reports back the error to CompilationUnit created by Eval#mkUnit, it sometimes returns OffsetPosition whose `source` is set to `NoSourceFile`.

This causes ArrayIndexOutOfBoundsException. The current workaround is to pattern match on the passed in pos and create a new one when the incoming source looks suspicious.
I have not figured out whether this is caused by our macro code or compiler.
There are various build.sbt errors that would cause this behavior:

```scala
libraryDependencies ++= Seq(
  depA
  depB // missing comma
)

lazy val bob = scala.Console println

test ++

run+
```
2014-08-07 23:58:49 -04:00
Jacek Laskowski 8affccb42a BuiltinCommands.initialize has load-commands commented out 2014-08-06 23:56:59 +02:00
Jacek Laskowski 8c4f4a7182 Properly show reload help 2014-08-06 23:30:47 +02:00
Eugene Yokota f318436725 Deprecate parseScopedKey 2014-08-05 11:28:28 -04:00
Eugene Yokota ee01908369 Fixes #1384. Fixes Scope.parseScopedKey
Scope.parseScopedKey now supports full range of legal keys
described in the documentation including {.} and other
notation for ProjectRef, BuildRef, and ThisBuild.
2014-08-05 11:28:28 -04:00
eugene yokota cd40f05085 Merge pull request #1498 from sbt/wip/fix-broken-cross
Fix broken cross versioning semantics using +
2014-08-04 17:38:34 -04:00
eugene yokota e9b79c5956 Merge pull request #1490 from sbt/wip/1484
Fixes NullPointerException during update. Fixes #1484
2014-08-04 11:50:47 -04:00
Josh Suereth 19b91396a2 Fix broken cross versioning semantics using + 2014-08-04 10:44:40 -04:00
Eugene Yokota dc2ae51d73 Adds UnresolvedWarningConfiguration that caches ModuleID -> SourcePosition mapping.
UnresolvedWarning is moved back to IvyActions.scala where it belongs.
The mapping between ModuleID and SourcePosition is passed in as UnresolvedWarningConfiguration.
This is calculated once in Defaults using State and is cached to filesystem.
2014-08-03 02:31:56 -04:00
Eugene Yokota 58b7c63f84 Unresolved dependency warning includes source position. Fixes #528
Unresolved dependency warning is moved to UnresolvedDependencyWarning class including
the fail path that was added in #1467.
To display the source position, I need to access the State, so I had to move the
error processing out of IvyActions and add UnresolvedDependencyWarning, which is
aware of State.
2014-08-02 06:25:24 -04:00
Eugene Yokota 9124056440 Fixes NullPointerException during update. Fixes #1484 2014-08-01 21:00:41 -04:00
Josh Suereth cc7546b1eb Fixes #856 - Store ++ scala version changes on session.
* Ensure the ++ command stores its changes on the sbt session.
* Make sure `session clear-all` will clear out ++ changes
* Validate that `set` command doesn't undo `++` changes

Note: There is some autogenerated Setting[_] delegate optimisation
      work that could be done in the future.
2014-08-01 17:39:43 -04:00
Josh Suereth f4ff84db34 Fixes #1375 - Check for empty filenames.
Starting sbt in root isn't a great idea, but it shouldn't break.
2014-08-01 17:36:14 -04:00
Josh Suereth 49f1529c5a Fixes #1478 - Append new sLog when reloading in set command.
* Migrate weak reference into logger class so we can test clearing it.
* Ensure new state.log is propoagted into settings on `set` command.
* Fix set test so that it ensures the sLog is relatively stable when
  reloading on set command.
2014-08-01 15:04:32 -04:00
Eugene Yokota c8af32950d Implements eviction warning stories. #1200
This implements all stories from https://github.com/sbt/sbt/wiki/User-Stories%3A-Conflict-Warning.
When scalaVersion is no longer effective an eviction warning will display.

    Scala version was updated by one of library dependencies:
        * org.scala-lang:scala-library:2.10.2 -> 2.10.3

When there're suspected incompatibility in directly depended Java libraries,
eviction warnings will display.

   There may be incompatibilities among your library dependencies.
   Here are some of the libraries that were evicted:
      * commons-io:commons-io:1.4 -> 2.4

When there's suspected incompatiblity in directly depended Scala libraries,
eviction warnings will display.

  There may be incompatibilities among your library dependencies.
  Here are some of the libraries that were evicted:
      * com.typesafe.akka:akka-actor_2.10:2.1.4 -> 2.3.4

This also adds 'evicted' task, which displays more detailed eviction warnings.
2014-07-27 12:26:12 -04:00
Eugene Yokota f2ad294984 Fixing more NullPointerError by wrapping license URL with Option 2014-07-27 12:01:11 -04:00
Eugene Yokota bb6e3e34e6 Fixing NullPointerError caused by reading String from Ivy directly 2014-07-25 03:51:20 -04:00
Eugene Yokota d40733807f Implemented general eviction warning. #1200
a> update
    [info] Updating {file:/foo/}a...
    [info] Resolving org.fusesource.jansi#jansi;1.4 ...
    [info] Done updating.
    [warn] Some dependencies were evicted:
    [warn]  * org.scala-lang:scala-library (2.10.1) -> 2.10.3
2014-07-25 03:51:20 -04:00
Eugene Yokota 855e7f176b Expand ModuleReport into the full Ivy resolution report. #1200
Currently sbt's update task generates UpdateReport from
Ivy's resolution report.
For each configuration there's ConfigurationReport, which contains
just enough information on the resolved module/revision/artifact.

Speaking of module, in Ivy module means organization and name,
and organization, name, and version is called module revision.
In sbt, module revision is called Module.
This is relevant because to talk about evictions, we need
a terminology for organization and name combo.

In any case ConfigurationReport is expanded to have `details`
field, which contains Seq[ModuleDetailReport], which represents
organization and name combo plus all the modules
just like Ivy's resolution report XML.
Furthermore, ModuleReport is expanded to include licenses,
eviction, callers, etc.
2014-07-25 03:51:19 -04:00
Eugene Yokota e997769971 Consolidated resolution. Fixes #413
This adds a new setting key called updateOptions, which can enable
consolidated resolution for update task.
The consolidated resolution automatically generates an artificial
module descriptor based on the SHA-1 of all external dependencies.
This consolidates the Ivy resolution of identical Ivy dependency
graph across multiple subprojects.

This is how it's enabled:

    updateOptions := updateOptions.value.withConsolidatedResolution(true)
2014-07-24 02:12:46 -04:00
eugene yokota 9df5882766 Merge pull request #1456 from sbt/wip/build-sbt-vals-in-set-command
Export build.sbt values inside sbt.
2014-07-21 10:30:39 -04:00
Josh Suereth 50696398a1 Minor cleanups and fix Eval tests to work correctly. 2014-07-17 23:32:29 -04:00
Josh Suereth 31c9de8efd Fix the val extractor to only pull sbt types rather than all. 2014-07-17 19:54:52 -04:00
Josh Suereth 13fc1114de Export build.sbt values inside sbt.
* Expose the values PAST the Eval/sbt.compiler package.
* Find projects using the name API rather than finding htem and dropping all values immediately.
* Adds a test to make sure the .sbt values are discovered and set-able
* Expose .sbt values in Set command and inside BuildUnit methods.
* Ensure `consoleProject` can see build.sbt values.
* Add notes for where we can look in the build if we want to expose .sbt values between files.
2014-07-17 16:29:06 -04:00
Josh Suereth e2949222b3 Make it so we can disable all default plugins (except the core plugin). 2014-07-15 00:51:55 -04:00
Peter Vlugter f7fbdb0281 Select the first test fingerprint for a test name for forked tests
Move the 'distinct by name' filter to Tests.processOptions, which is used
by both in-process and forked tests.
2014-07-14 11:57:52 +12:00
Josh Suereth f2e805a0d8 Merge pull request #1367 from dansanduleac/issue/1366
Don't update classifiers of projectDependencies
2014-07-02 10:09:45 -04:00
Lukasz Piepiora 871ccb0ab9 Fixes #1416: Plugin command doesn't work
Fix `plugin` command not working with plugin names containing `.`
2014-06-29 23:55:23 +02:00
eugene yokota 79cbc5a744 Merge pull request #1424 from jaceklaskowski/deprecated-annotation-param-positions
Message and since parameters in @deprecated properly placed
2014-06-24 22:59:55 -04:00
eugene yokota 77384a8a05 Merge pull request #1425 from jaceklaskowski/typo-fixes
Typo fixes + removing unnecessary semicolons
2014-06-24 22:58:59 -04:00
Jacek Laskowski ebbb77e200 Typo fixes + removing unnecessary semicolons 2014-06-25 00:08:25 +02:00
Jacek Laskowski d1dbdfc816 Message and since parameters in @deprecated properly placed 2014-06-24 22:35:34 +02:00
Lukasz Piepiora 75a05dfcbf Fix AutoPlugins declared at top-level
Fixes exception occuring when loading auto plugins, which are declared
as top-level classes
2014-06-24 20:52:18 +02:00
Jacek Laskowski 54bc04dadb Place version and comment correctly in @deprecated 2014-06-18 00:18:05 +02:00
Dan Sanduleac b4cfd7ab76 Don't update classifiers of projectDependencies 2014-06-02 10:14:01 +01:00
eugene yokota baf78797d6 Merge pull request #1378 from sbt/wip/fix-default-generated-projects
Allow autogenerated projects to have overridden organization.
2014-05-29 14:32:17 -04:00
Josh Suereth 68a2f57da9 Allow autogenerated projects to have overridden organization.
* Change detection of "default project" to accurately see
  if someone has changed the organization.
* Add a flag to notify downstream consumers that a project
  was autogenerated and not user specified.

Fixes #1315
2014-05-28 12:55:05 -04:00
Dan Sanduleac c006692fc3 Make GlobalPluginData preserve compatibility wrt .unapply 2014-05-28 14:50:41 +01:00
Dan Sanduleac b382cf464d build projects' transitiveUpdate to depend on globalPluginUpdate 2014-05-28 14:50:40 +01:00
Dan Sanduleac 87e9250cb2 Revert "Load global plugins in their own class loader and replace the base loader with that. Fixes #272."
This reverts commit 8cb7e23011.

Conflicts:
	main/src/main/scala/sbt/Load.scala
2014-05-28 14:50:39 +01:00
Josh Suereth 2dc910ba0b Merge pull request #1358 from dansanduleac/issue/1194
Resolve ThisProject properly
2014-05-28 09:45:28 -04:00
cheeseng 83af01b88a Changed to combine SuiteResult with same name, instead of replacing with latest one. This solves the test result count problem when a Suite is executed more than 1 time due to being returned as nested suites (sub-task). 2014-05-22 17:28:26 +08:00
Dan Sanduleac 5deb103ef6 Fix resolving Select(ThisProject) 2014-05-21 01:16:15 +01:00
Paul Phillips e88d1436c5 Remove line of dead code.
Unmoored expression in constructor does nothing except pack
on a few micros.
2014-05-19 06:17:44 -07:00
Josh Suereth 7d0b517be2 Merge remote-tracking branch 'origin/0.13.5' into wip/merge-0.13.5
Conflicts:
	main/src/main/scala/sbt/Load.scala
2014-05-16 14:04:51 -04:00
Josh Suereth e95feccfca Fix pattern match on buildLoaders.
Fixes #1341
2014-05-16 07:41:29 -04:00
Josh Suereth abffc3e1bd Bump expected 2.11 module versions so we can compile with 2.11
Add scala 2.11 test/build verification.

* Add 2.11 build configuratoin to travis ci
* Create command which runs `safe` unit tests
* Create command to test the scala 2.11 build
* Update scalacheck to 1.11.4
* Update specs2 to 2.3.11
* Fix various 2.11/deprecation removals
  and other changes.

Fix eval test failure in scala 2.11 with XML not existing.
2014-05-14 19:08:05 -04:00
eugene yokota 1d67d42da3 Merge pull request #1334 from sbt/wip/merge-0.13.5
Wip/merge 0.13.5
2014-05-14 09:06:09 -04:00
eugene yokota d1b6410c02 Merge pull request #1333 from sbt/wip/fix-derived-setting-tests
Fixed project/derived test to pass
2014-05-14 09:05:59 -04:00
Josh Suereth 81ae2fa582 Merge remote-tracking branch 'origin/0.13.5' into wip/merge-0.13.5
Conflicts:
	main/src/main/scala/sbt/EvaluateTask.scala
2014-05-13 19:31:44 -04:00
Josh Suereth 148b578681 Fix project load ordering to match 0.13.5 and previous.
* root project needs to be discovered FIRST in the list.
* All other rpojects come in the order they were seen.
2014-05-13 18:27:04 -04:00
Josh Suereth 664d83ed0f Back out autogc fix to be optionally enabled.
Workaround for #1329
2014-05-13 13:14:39 -04:00
Peter Vlugter 7948fbafbc Use separate update caches when cross compiling scala 2014-05-13 16:14:30 +12:00
Eugene Yokota 2b621869fc Check for object autoImport in auto plugins. Fixes #1314 2014-05-08 21:54:04 -04:00
Josh Suereth af1c581cbb Rework sbt's loading mechanism to allow `ProjectManipulation` DSL entries to take effect.
This does the following:

* Fragments loading into two stages:  Discovery + Resolution
* Discovery just looks for .sbt files and Projects, while
  loading/compiling them.
* Resolution is responsible for taking discovered projects and
  loaded sbt files and globbing everything together.  This includes
  feeding the project through various manipulations, applying
  AutoPlugin settings/configurations and ordering all the settings.
* Add a bunch of docs
* Add direct DSL `enablePlugins` and test
* Add direct DSL `disablePlugins` and test.
2014-05-07 12:35:17 -04:00
Josh Suereth 746583e718 Alter the DSL slightly to use explicit DslEntry types for settings.
* Create new DSLEntry type for settings so we can categorize what we parse
* Use DSLEntry to help solve the Setting[_] vs. Seq[Setting[_]] implicit fun.
* Hack away any non-Setting[_] DSLEntry for now.
* Add test in build.sbt to make sure the new DSL works.
2014-05-07 12:35:17 -04:00
eugene yokota d198ea4099 Merge pull request #1316 from sbt/wip/fix-broken-build
This doesn't quite fix the build, but gets closer
2014-05-07 12:23:09 -04:00
Josh Suereth 244abd3b6f Scalariforming test code 2014-05-07 11:52:23 -04:00
Martynas Mickevicius f11d3dbce4 Sort setting key names in the inspect tree view. 2014-05-07 14:32:10 +02:00
Eugene Yokota 785b0274ee some more source getting formatted 2014-05-02 18:07:05 -04:00
Eugene Yokota adb41611cf added scalariform 2014-05-01 12:50:07 -04:00
Dan Sanduleac 512494cd04 Couple of fixes 2014-05-01 01:35:48 +01:00
Dan Sanduleac 0377a40cf8 Optimise scope intersection for GlobalScope 2014-05-01 01:35:48 +01:00
Dan Sanduleac f485270adf Put sbt's derived settings under GlobalScope 2014-05-01 01:35:48 +01:00
Dan Sanduleac 3161d75a41 Decouple DefaultSetting from Setting/DerivedSetting; BuildCommon.derive() produces default settings by default 2014-05-01 01:35:48 +01:00
Jacek Laskowski 95b976b6d4 Detailed help for the reload command (following project's) 2014-04-24 23:53:31 +02:00
eugene yokota 1819276bb8 Merge pull request #1278 from sbt/wip/junit-xml-reporter
Migrate JUnitXmlReporter into sbt as autoplugin
2014-04-22 16:53:02 -04:00
eugene yokota 9d86d56797 Merge pull request #1277 from sbt/fix/issue-1267
Separate location of analysis cache if we're cross compiling scala.
2014-04-22 13:45:49 -04:00
Josh Suereth fc3f6dd1d9 Remove enabling key for JunitXmlReportPlugin.
This migrates JunitXmlReportPlugin to work the way we desire
new sbt features/plugins to work:

* Enabling the feature is having the plugin available.
* Disabling the feature is disabling the plugin
* All code/settings for the feature are isolated to the plugin.
2014-04-22 11:23:15 -04:00
Josh Suereth f5dd022551 Separate location of analysis cache if we're cross compiling scala.
* Add task to determine file-name of analysis cache
* If crossPaths := true, then add scala binary version to the analysis cache name.

This makes it possible to leverage incremental compilation with the `+` command.

Fixes #1267
2014-04-22 11:12:59 -04:00
Josh Suereth 447ae8b1d8 Migrate JUnitXmlReport into an autoplugin. 2014-04-22 10:38:35 -04:00