Commit Graph

315 Commits

Author SHA1 Message Date
Dale Wijnand a974ce7bb4 Write sbt.version to project/build.properties
Have sbt.version set in project/build.properties is a best practice
because it makes the build more deterministic and reproducible.

With this change sbt, after ensuring that the base directory is probably
an sbt project, writes out sbt.version in project/build.properties if it
is missing.

Fixes #754
2017-04-04 18:46:24 -04:00
Guillaume Martres 334517aba8 Fix #3013: ScriptedPlugin: Add support for paginated tests
This was already supported in the internal Scripted used by sbt but not
in the ScriptedPlugin. This is fixed by just copy-pasting the modified
parser. We will have to wait for sbt itself to be built using an sbt
with the upgraded ScriptedPlugin to be able to avoid the code duplication.
2017-04-04 17:05:17 -04:00
Guillaume Martres 2283c68031 Automatically choose proper compiler bridge for dotty
Before this commit, using dotty in your sbt project required to add:
  scalaCompilerBridgeSource := ("ch.epfl.lamp" % "dotty-sbt-bridge" %
    scalaVersion.value % "component").sources()
in your build.sbt. We might as well automatically do this, this reduces
the boilerplate for using dotty in your project to:
  scalaOrganization := "ch.epfl.lamp"
  scalaVersion := "0.1.1-SNAPSHOT"
  scalaBinaryVersion := "2.11" // dotty itself is only published as a
                               // 2.11 artefact currently
2017-04-04 14:49:32 -04:00
eugene yokota c6b593df95 Merge pull request #2990 from valydia/1.0.x
Add logging of the name(s) of build files
2017-03-09 14:46:19 -05:00
valydia 047a061812 Add logging of the name(s) of build files
Fixes #1911
2017-03-04 14:13:39 +00:00
ekrich b97d68a214 Fix #2551: scripted mode ignores quotation 2017-02-14 10:29:58 -05:00
Roman Iakovlev 982a7c8724 Add new SBT global setting asciiGraphWidth
This setting controls the maximum width of the ASCII graphs printed
by commands like `inspect tree`. Default value corresponds to the
previously hardcoded value of 40 characters.
2017-01-22 13:06:20 -05:00
Josh Soref 582c9cbcf7 spelling: undefined 2017-01-20 08:30:01 +00:00
Josh Soref b873338f25 spelling: disabled 2017-01-20 08:13:29 +00:00
Josh Soref 80583a35bb spelling: dependent 2017-01-20 08:13:17 +00:00
Josh Soref a8ce474fd6 spelling: dependencies 2017-01-20 08:13:00 +00:00
Josh Soref 701b57107f spelling: compatibility 2017-01-20 08:11:39 +00:00
Josh Soref f66acb8c0e spelling: abstraction 2017-01-20 08:06:55 +00:00
Eugene Yokota 569e19d03c Add build-level keys to the tab completion
Fixes #2460
Fixes #2851
Ref #2707, #2708, #2469

Unlike the previous attempts at fixing the handling of build-level
keys, this change does not change the main parsing logic, which uses
`getKey` to retrieve the key from the key map.
The fact that shell worked pre-0.13.11 means that the parsing was ok.

What this changes is just the "example" keys supplied to the parser so
the tab completion works.
2017-01-16 15:39:01 -05:00
Eugene Yokota 73a427c0b8 Adds templateResolvers and `new` command
This adds `new` command, which helps create a new build definition. The
`new` command is extensible via a mechanism called the template
resolver,
which evaluates the arbitrary arguments passed to the command to find
and run a template.

As a reference implementation [Giter8][g8] is provided as follows:

    sbt new eed3si9n/hello.g8

This will run eed3si9n/hello.g8 using Giter8.

  [g8]: http://www.foundweekends.org/giter8/
2017-01-16 08:43:23 -05:00
eugene yokota 6493f336b9 Merge pull request #2917 from eed3si9n/fport/2730
[fport] Fail when the forked test harness fails
2017-01-15 21:01:01 -05:00
Eugene Yokota 3ec0734f6c Move release notes 2017-01-15 05:59:51 -05:00
Eugene Yokota beb1fe3c5a Fail when the forked test harness fails
Fail when the forked test harness fails using NonFatal
Fixes #2442/#2722

Add another fork-uncaught scripted test
Originally from https://github.com/retronym/sbt-test-fork-swallows-error
2017-01-15 05:49:07 -05:00
Anatoly Fayngelerin 6dc2cf4210 dependsOn can now be used inside a .sbt file for a subproject 2017-01-14 07:18:10 -05:00
Ashley Mercer f92a0ab8a5 JUnitXmlTestsListener now correctly flags ignored, skipped and pending tests
Fixes #2198 Ref #2854

Generated Junit-style XML reports now include a count of ignored,
skipped and pending tests; and individual tests are correctly flagged
with the <skipped/> element.
2016-12-01 10:45:13 +00:00
Dale Wijnand befb0925e3
Make publishTo & otherResolvers TaskKey's
Fixes #2059
2016-09-29 01:35:51 +01:00
Eugene Yokota 15c078ab0b Quieter ivyLoggingLevel for CI
`ivyLoggingLevel` is dropped to `UpdateLogging.Quiet` when Jenkins or
Travis is detected.
2016-09-15 22:57:07 -04:00
Eugene Yokota 357a146460 Silent startup for scalas
Fixes #840
2016-09-15 03:42:23 -04: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
Eugene Yokota 8f29d3b724 Typo 2016-06-24 18:57:36 +02: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 74f8fe9c4f Notes 2016-05-12 19:25:24 -04:00
Eugene Yokota e1009ae729 Notes 2016-05-12 18:47:22 -04:00
Eugene Yokota 2e868fbc92 Typo fixes 2016-05-08 17:13:23 -04:00
Eugene Yokota 1d7872dad5 notes 2016-05-08 13:35:57 -04:00
Eugene Yokota ee272d780e Reorganize directory structure 2016-05-06 16:01:49 -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
Eugene Yokota faf0683a7a 0.13.11 notes 2016-05-01 01:26:18 -04:00
Eugene Yokota 7f2ab136e5 Fixes #1616. Fixes the "latest snapshot" chain resolver
The "latest snapshot" chain resolver was assuming that there's at least
one artifact per module. I think that was the root cause of #1616.
2016-02-27 04:07:33 -05:00
Eugene Yokota 0fca1a9ff4 Fixes #1514. Enable latest SNAPSHOT option by default
to check all resolvers to find the latest snapshot artifacts.
This behavior did not work well with Maven repositories where sbt was
failing to calculate the correct publication dates.
Now that #2075 fixes the Maven integration issue we should enable this
flag back again.

The build user can opt out by:

    updateOptions := updateOptions.value.withLatestSnapshots(false)
2016-02-27 04:07:33 -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 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
Eugene Yokota 31e07492c7 Add JCenter change to 0.13.9's notes 2016-02-25 23:02:16 -05: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 e31d8a7a0c FPORT: Bumping Scala version to 2.10.6.
Forward-port of #2311.
2016-01-17 02:38:40 +00:00
eugene yokota ad59b31c35 Merge pull request #2380 from dwijnand/fport/add-sbt-ivy-snapshots-to-launchconfig
FPORT: Include sbt-ivy-snapshots to launchconfig
2016-01-16 14:54:51 -05:00
eugene yokota ae2c5f1d12 Merge pull request #2379 from dwijnand/fport/release-notes-for-name-hashing-private-members
FPORT: Release notes for name hashing private members fix
2016-01-16 14:54:39 -05:00
eugene yokota 291059a72b Merge pull request #2378 from dwijnand/use-ivyConfiguration-in-updateSbtClassifiers-in-compilers-to-fetch-compiler-bridge-sources
FPORT: Adds bootIvyConfiguration to grab compiler bridge source. Fixes #2336
2016-01-16 14:54:27 -05:00
Eugene Yokota 01b46a6d6a Include sbt-ivy-snapshots to launchconfig
Forward-port of #2338.

Include sbt-ivy-snapshots to launchconfig
Prior to this change, the launchconfig for sbt was generated using
Transform's resource generator so releases would include
`typesafe-ivy-releases` repo, and snapshot releases would include
`typesafe-ivy-snapshots` and `sonatype-snapshots` repos in addition.
This is no longer useful since nightly builds are now published to
`sbt-ivy-snapshots` instead, which is backed by Bintray.

This removes the switching logic, so both `typesafe-ivy-releases` and
`sbt-ivy-snapshots` repos are always included into the launchconfig.
This removes the step of needing to download a launcher just to try the
nightly builds.
2016-01-16 16:52:12 +00:00
Dale Wijnand d514bea6cc FPORT: Release notes for name hashing private members fix
Forward-port of #2339.
2016-01-16 16:35:18 +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
Eugene Yokota e3a2b94dd1 FPORT: Release notes for 0.13.10
Forward-port of #2315.
2016-01-16 12:41:07 +00:00
Dale Wijnand c5949268ef Drop sealed from the typeclasses in Append
Forward port of #2322
2016-01-08 16:45:06 +01: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 a631c635e2 Fix link refs. 2015-11-12 09:52:23 -08:00
Jesse Kinkead ce4ae7a475 Release notes for apiURL change. 2015-11-12 09:32:16 -08:00
Dale Wijnand 397c25679f Add notes for #1750. 2015-08-28 23:38:49 +01:00
Josh Suereth da8bb5b621 Merge pull request #2151 from dwijnand/add-Def.settings
Extract Def.settings from Project#settings.
2015-08-25 09:52:27 -04:00
Dale Wijnand 786dc7fd10 Add notes for MavenRepository.localIfFile. 2015-08-23 17:33:19 +01:00
Dale Wijnand dcbbc531ed Add notes for PR 2151. 2015-08-20 18:45:42 +01:00
Dale Wijnand a432c3def1 Merge remote-tracking branch 'origin/0.13.9' into merge-0.13.9-into-0.13
* origin/0.13.9:
  Notes
  0.13.9
  cached resolution: use mutable map to speed up breakLoops
  cached resolution: don't include callers from evicted modules
  Add debug logs
  Fixes #2129. break up circular dependency loops in cached resolution
  try breaking circular dependency and continue sorting
  refactored to use less stack space
  make sortModules tailrec
  Reproduce stack overflow using cached resolution with circular dependency
2015-08-11 22:42:31 +01:00
Eugene Yokota 946ee17081 Notes 2015-08-11 17:24:55 -04:00
Eugene Yokota 431a90264d Fixes #2129. break up circular dependency loops in cached resolution
Simple remove-one method to workaround for circular dependency did not
work. This fix traverses the entire graph to detect all loops and then
breaks them up.
2015-08-03 07:31:32 -04:00
Josh Suereth f3b5bcc02b Merge pull request #2127 from sbt/wip/warn-on-intransitive-pom
Add warning to MakePom for intransitive dependencies.
2015-07-25 08:23:09 -04:00
Josh Suereth 92acfe1287 Fixes from review 2015-07-24 12:48:11 -04:00
Josh Suereth 9beff22d9a Add warning to MakePom for intransitive dependencies.
Intransitive does not work in Maven, and does not translate to pom.xml.
2015-07-24 10:42:49 -04:00
Josh Suereth bad1e9d487 Add handling for transitive exclude rules in pom.xml files.
Fixes #2109

* Add maven resolver tests back to travisCI
* Disable ivy.xml translation test from maven-repository-resolver config, due to incorrect assumptions.
2015-07-23 15:32:27 -04:00
eugene yokota c703b2a6a0 Merge pull request #2116 from sbt/0.13.9
Merge 0.13.9 back into 0.13
2015-07-18 13:36:04 -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
Eugene Yokota 7eb7df017e Fixes #2105/#1763. Cached resolution: removes duplicate callers during merge 2015-07-18 02:17:25 -04: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
fkorotkov c73f513016 review comments 2015-07-16 15:49:06 -04:00
fkorotkov a6f83dda97 added a note 2015-07-16 15:23:24 -04:00
Dale Wijnand 5428c07420 Move PR 2085 notes. 2015-07-16 16:24:45 +01:00
Martin Duhem 3195d7256e Notes 2015-07-16 15:46:14 +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 e3ba86fdbb Add notes for the change 2015-07-13 21:38:48 -07:00
eugene yokota 67d908a4a6 Merge pull request #2101 from sbt/0.13.9
merge 0.13.9 on 0.13
2015-07-10 16:07:05 -04:00
Eugene Yokota 0b718bb3fa notes 2015-07-10 11:40:38 -04:00
Pierre DAL-PRA ea0abefac9 Add notes 2015-07-09 23:45:01 +02:00
Martin Duhem 6c123f22ba Hide stacktrace on compilation error in build definition 2015-07-09 11:40:02 +02:00
Eugene Yokota a9f0a16486 Merge notes 2015-06-28 22:06:52 -04:00
eugene yokota f44f4540db Merge pull request #2079 from sbt/wip/distinct-rename
Fixes #1973. Renames distinct to distinctName
2015-06-28 21:58:46 -04:00
Eugene Yokota 16b95a4d62 Add distinctPath 2015-06-28 14:41:32 -04:00
Dale Wijnand 81524b1b6a Add notes for #2008/#2009. 2015-06-28 12:22:38 +01:00
Eugene Yokota 4bae8b3acb Fixes #1973. Renames distinct to distinctName 2015-06-27 05:56:43 -04:00
Eugene Yokota f0dbbe15b0 Release note for #2075/#2005 2015-06-27 05:38:24 -04:00
Eugene Yokota 81f175ddbf Fixes #1666 2015-06-20 00:51:42 -04:00
Josh Suereth 0c1d07dde7 Merge pull request #2006 from jroper/run-input-task
Added Extracted.runInputTask
2015-06-17 10:12:51 -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
Eugene Yokota 558585c88f Fix links 2015-06-10 10:54:28 +02:00
Eugene Yokota 97956ac9eb Notes 2015-06-09 18:10:45 +02:00
Eugene Yokota d75c748a8b Merge notes 2015-06-09 17:49:53 +02:00
Josh Suereth 5bf5fbee31 Adding notes 2015-05-29 16:16:05 -04:00
Dale Wijnand bbfbdde427 Add notes for project-level excludes in the POM. 2015-05-28 08:15:12 +01:00
Josh Suereth 58db4873b2 Merge pull request #2036 from kamilkloch/2028-fork-error
Updated ForkError.getMessage() to include exception's original name.
2015-05-27 18:45:25 -04:00
Josh Suereth e05b747fdd Merge pull request #2027 from cunei/wip-fix-2001
Do not emit in the pom dependencies that are only sources or docs
2015-05-27 18:43:50 -04:00
Antonio Cunei d14afcf67d Adding notes for 2001/2027 2015-05-26 23:48:05 +02:00
Kamil Kloch cd3af2f0cd Updated ForkError.getMessage() to include exception's original name. 2015-05-25 13:50:56 +02:00
Josh Suereth d63775451c Merge pull request #2025 from PanAeon/panaeon/fix-history
Prevent history command(s) from going into an infinite loop
2015-05-24 13:19:41 -04:00