sbt/DEVELOPING.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

193 lines
8.6 KiB
Markdown
Raw Normal View History

Developer guide
===============
### Getting started
Create a [fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) of the repository and [clone](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) it to create a local copy.
### Branch to work against
2023-10-22 03:00:31 +02:00
sbt uses two or three branches for development:
Spelling (#8028) * spelling: 1.x Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: a Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: aether Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: anymore Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: artifact Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: available Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: be Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: bridge Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: cannot Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: case-insensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: checksum Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: class loads Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: contra Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: dependencies Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: dependency Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: dependent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: deriveds Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: describes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: early Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: enclosed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: evaluation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: excluding Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: execution Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: for Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: frequently Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: github Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: green Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: https://www Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: https Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: in-sourcing Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: include Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: incompatible Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: indefinitely Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: information Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: inputted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: just Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: lastmodifiedtimes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: latest Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: manifest Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: miscellaneous Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: more Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: neither Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: never Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: opted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: outputting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: params Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: performance Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: preceding Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: presentation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: project Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: projects Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: protocol Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: related Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: representation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: res Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: resolverlist Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: resolverset Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: response Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: returned Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: sbt_version Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: scalacheck Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: sentinels Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: separates Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: serves Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: should Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: significant Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: specifically Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: substitute Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: suppress Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: terminal Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: title Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: transitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: version Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: versions Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: want Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: wanting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: whether Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * link: sbt Cached Resolution Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * link: Testing sbt plugins Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-02-04 07:11:28 +01:00
Use the **default** branch set on GitHub for bug fixes.
2023-10-22 03:00:31 +02:00
- Next minor branch: `1.$MINOR.x`, where `$MINOR` is next minor version (e.g. `1.10.x` during 1.9.x series)
2022-12-31 19:38:17 +01:00
- Development branch: `develop`
2023-10-22 03:00:31 +02:00
- Stable branch: `1.$MINOR.x`, where `$MINOR` is current minor version (e.g. `1.9.x` during 1.9.x series)
2023-10-22 03:00:31 +02:00
The `develop` branch represents sbt 2.x, the next major sbt series.
Next minor branch is where new features should be added as long as it is binary compatible with sbt 1.x.
The `stable` branch represents the current stable sbt release. Only bug fixes are back-ported to the stable branch.
2020-11-21 21:14:54 +01:00
2024-10-20 06:51:06 +02:00
### Note on supported JDK version for the sbt build
2024-10-20 06:51:06 +02:00
The sbt build itself currently doesn't support any JDK beyond version 21. You may run into deprecation warnings (which would become build errors due to build configuration) if you use any later JDK version to build sbt.
If you're using Metals as IDE, also check the `Java Version` setting. The default at the time of writing this is `17`, but this may change in the future, or you may have set it to a later version yourself. (Be aware that Metals may download a JDK in the background if you haven't switch to a local JDK matching the version before changing this setting. Also, this setting is currently only available as a `User` setting, so you can't set it for a single workspace. Don't forget to switch back if you need to for other projects).
2020-11-21 21:14:54 +01:00
### Instruction to build just sbt
Sbt has a number of sub-modules. If the change you are making is just contained in sbt/sbt (not one of the sub-modules),
you can use the `publishLocal` command to publish the sbt project to your local machine. This is helpful for testing your changes.
2020-11-21 21:14:54 +01:00
```
$ sbt
sbt:sbtRoot> publishLocal
```
### Instruction to build all modules from source
When working on a change that requires changing one or more sub modules, the source code for these modules can be pulled in by running the following script
(instead of building them from Maven for example and not being able to change the source code for these sub-modules).
1. Install the current stable binary release of sbt (see [Setup]), which will be used to build sbt from source.
2. Get the source code.
```
$ mkdir sbt-modules
$ cd sbt-modules
2024-10-09 13:43:02 +02:00
$ for i in sbt io zinc; do \
git clone https://github.com/sbt/$i.git && (cd $i; git checkout -b develop origin/develop)
done
$ cd sbt
$ ./sbt-allsources.sh
```
3. To build and publish all components locally,
```
$ ./sbt-allsources.sh
sbt:sbtRoot> publishLocalAllModule
```
### Using the locally built sbt
The `publishLocal` command above will build and publish version `1.$MINOR.$PATCH-SNAPSHOT` (e.g. 1.1.2-SNAPSHOT) to your local ivy repository.
To use the locally built sbt, set the version in `build.properties` file in your project to `1.$MINOR.$PATCH-SNAPSHOT` then launch `sbt` (this can be the `sbt` launcher installed in your machine).
```
$ cd $YOUR_OWN_PROJECT
$ sbt
> compile
```
### Nightly builds
_Note: The following section may require an update._
2020-11-21 21:14:54 +01:00
The latest development versions are available as nightly builds on sbt-maven-snapshots (<https://repo.scala-sbt.org/scalasbt/maven-snapshots>) repo, which is a redirect proxy whose underlying repository is subject to change it could be Bintray, Linux box, etc.
To use a nightly build:
1. Find out a version from [/org/scala-sbt/sbt/](https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/).
2020-11-21 21:14:54 +01:00
2. Put the version, for example `sbt.version=1.5.0-bin-20201121T081131` in `project/build.properties`.
2020-11-21 21:14:54 +01:00
sbt launcher will resolve the specified sbt core artifacts. Because of the aforementioned redirection, this resolution is going to be very slow for the first time you run sbt, and then it should be ok for subsequent runs.
Unless you're debugging the `sbt` script or the launcher JAR, you should be able to use any recent stable version of sbt installation as the launcher following the [Setup][Setup] instructions first.
If you're overriding the repositories via `~/.sbt/repositories`, make sure that there's a following entry:
```
[repositories]
...
sbt-maven-snapshots: https://repo.scala-sbt.org/scalasbt/maven-snapshots/, bootOnly
```
### Clearing out boot and local cache
sbt consists of lots of JAR files. When running sbt locally, these JAR artifacts are cached in the `boot` directory under `$HOME/.sbt/boot/scala-2.12.6/org.scala-sbt/sbt/1.$MINOR.$PATCH-SNAPSHOT` directory.
In order to see a change you've made to sbt's source code, this cache should be cleared. To clear this out run: `reboot dev` command from sbt's session of your test application.
By default sbt uses a snapshot version (this is a scala convention for quick local changes- it tells users that this version could change).
One drawback of `-SNAPSHOT` version is that it's slow to resolve as it tries to hit all the resolvers.
2023-06-14 13:51:31 +02:00
This is important when testing performance, so that the slowness of the resolution does not impact sbt.
You can workaround that by using a version name like `1.$MINOR.$PATCH-LOCAL1`.
A non-SNAPSHOT artifacts will now be cached under `$HOME/.ivy/cache/` directory, so you need to clear that out using [sbt-dirty-money](https://github.com/sbt/sbt-dirty-money)'s `cleanCache` task.
### Running sbt "from source" - `sbtOn`
In addition to locally publishing a build of sbt, there is an alternative, experimental launcher within sbt/sbt
to be able to run sbt "from source", that is to compile sbt and run it from its resulting classfiles rather than
from published jar files.
Such a launcher is available within sbt/sbt's build through a custom `sbtOn` command that takes as its first
argument the directory on which you want to run sbt, and the remaining arguments are passed _to_ that sbt
instance. For example:
I have setup a minimal sbt build in the directory `/s/t`, to run sbt on that directory I call:
```bash
> sbtOn /s/t
[info] Packaging /d/sbt/scripted/sbt/target/scala-2.12/scripted-sbt_2.12-1.2.0-SNAPSHOT.jar ...
[info] Done packaging.
[info] Running (fork) sbt.RunFromSourceMain /s/t
Listening for transport dt_socket at address: 5005
[info] Loading settings from idea.sbt,global-plugins.sbt ...
[info] Loading global plugins from /Users/dnw/.dotfiles/.sbt/1.0/plugins
[info] Loading project definition from /s/t/project
[info] Set current project to t (in build file:/s/t/)
[info] sbt server started at local:///Users/dnw/.sbt/1.0/server/ce9baa494c7598e4d59b/sock
> show baseDirectory
[info] /s/t
> exit
2019-07-18 23:23:05 +02:00
[info] shutting down sbt server
[success] Total time: 19 s, completed 25-Apr-2018 15:04:58
```
Please note that this alternative launcher does _not_ have feature parity with sbt/launcher. (Meta)
contributions welcome! :-D
2021-09-18 23:37:41 +02:00
### Updating Scala version
See https://github.com/sbt/sbt/pull/6522 for the list of files to change for Scala version upgrade.
### Diagnosing build failures
Globally included plugins can interfere building `sbt`; if you are getting errors building sbt, try disabling all globally included plugins and try again.
### Running Tests
sbt has a suite of unit tests and integration tests, also known as scripted tests.
#### Unit / Functional tests
Various functional and unit tests are defined throughout the
project. To run all of them, run `sbt test`. You can run a single test
suite with `sbt testOnly`
#### Integration tests
2022-05-23 20:54:11 +02:00
Scripted integration tests reside in `sbt-app/src/sbt-test` and are
written using the same testing infrastructure sbt plugin authors can
Spelling (#8028) * spelling: 1.x Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: a Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: aether Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: anymore Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: artifact Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: available Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: be Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: bridge Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: cannot Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: case-insensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: checksum Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: class loads Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: contra Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: dependencies Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: dependency Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: dependent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: deriveds Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: describes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: early Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: enclosed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: evaluation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: excluding Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: execution Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: for Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: frequently Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: github Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: green Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: https://www Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: https Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: in-sourcing Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: include Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: incompatible Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: indefinitely Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: information Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: inputted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: just Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: lastmodifiedtimes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: latest Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: manifest Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: miscellaneous Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: more Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: neither Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: never Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: opted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: outputting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: params Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: performance Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: preceding Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: presentation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: project Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: projects Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: protocol Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: related Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: representation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: res Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: resolverlist Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: resolverset Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: response Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: returned Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: sbt_version Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: scalacheck Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: sentinels Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: separates Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: serves Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: should Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: significant Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: specifically Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: substitute Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: suppress Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: terminal Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: title Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: transitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: version Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: versions Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: want Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: wanting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: whether Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * link: sbt Cached Resolution Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * link: Testing sbt plugins Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2025-02-04 07:11:28 +01:00
use to test their own plugins with sbt. You can read more about [Testing sbt plugins](https://www.scala-sbt.org/1.x/docs/Testing-sbt-plugins).
You can run the integration tests with the `sbt scripted` sbt
command. To run a single test, such as the test in
2022-05-23 20:54:11 +02:00
`sbt-app/src/sbt-test/project/global-plugin`, simply run:
sbt "scripted project/global-plugin"
### Random tidbits
2023-10-22 03:00:31 +02:00
### Clean history
Make sure you document each commit and squash them appropriately. You can use the following guides as a reference:
* Scala's documentation on [Git Hygiene](https://github.com/scala/scala/tree/v2.12.0-M3#git-hygiene)
* Play's documentation on [Working with Git](https://www.playframework.com/documentation/2.4.4/WorkingWithGit#Squashing-commits)
#### Import statements
You'd need alternative DSL import since you can't rely on sbt package object.
```scala
// for slash syntax
import sbt.SlashSyntax0.given
// for IO
import sbt.io.syntax._
```