Tindzk Seed Versions Save

Build tool for Scala projects

0.1.7

4 years ago

Release Summary :pencil:

Version 0.1.7 features various UI improvements as well as new commands for running, publishing and documenting modules.

You can follow the linked pull requests for detailed descriptions of the changes.

Migration Steps :computer:

Use the following command to upgrade Seed:

blp-coursier bootstrap \
    -r bintray:tindzk/maven \
    tindzk:seed_2.12:0.1.7 \
    -f -o seed

The latest stable Bloop version 1.3.2 is recommended. Builds generated by Seed should be compatible with the newer prerelease version 1.4.0-RC1 too.

This release is fully backward-compatible.

New Features :rocket:

Project website (#68, #69)

The project documentation is now available as a separate website, courtesy of @hejfelix.

BSP support (#63)

This release integrates more tightly with Bloop. Previously, all Seed commands relied on Bloop CLI invocations which had several limitations (see #63). The majority of these were replaced by BSP requests.

This opened up the ability to make various user-facing improvements outlined in the following subsections.

Progress bars

When building modules, Seed subscribes to BSP notifications. Since Bloop publishes structured information on the compilation process, we can show progress bars in all Seed commands involving compilation. This is particularly useful in modular projects and helps to identify bottlenecks in the build pipeline:

asciicast

Run command

In addition to the already-existing link and build commands, run was introduced. The new command is similar to bloop run <module> which runs the main class of the supplied module. It is currently limited to only one module since programs may be non-terminating.

Watch mode

Seed can now register file watchers and trigger a new compilation pass whenever source files have changed. The watch mode is compatible with long-running processes such as servers:

asciicast

Furthermore, the user can run operations in parallel on multiple modules defined in the same build (which solves a limitation in Bloop v1.3.2). As an example, this makes the following workflow for client/server applications possible:

seed link client --watch  # Terminal 1: Link Scala.js frontend
seed run server --watch   # Terminal 2: Run Scala JVM backend

Publishing modules (#77)

With the new CLI command publish, modules can be published to a repository. The command packages and uploads the compiled class files, sources and documentation. At the moment, only Maven-style Bintray repositories are supported.

The following example shows how to publish a project to Bintray:

asciicast

The first step is to define a [package] section in the build configuration. Afterwards, we set a Git tag for the new release. Finally, running the command seed publish <target> <modules> builds, packages and uploads the supplied module.

For more information, please refer to the sections on credentials, build configuration and usage in the manual.

Documenting modules (#77)

A new CLI command doc is available for generating HTML documentations. doc takes a list of modules and runs Scaladoc on them separately. It supports Scala 2.11, 2.12 and 2.13, including alternative compilers such as Typelevel Scala.

doc can be invoked on any module without any changes to the build file: asciicast

Scala.js 1.0 support (#92, #97)

Several changes were made for Scala.js 1.0 compatibility. Whilst Bloop 1.3.2 does not support Scala.js 1.0 yet, Seed builds are compatible with the upcoming Bloop 1.4.0 release.

Once Bloop 1.4.0 has been published, a new Docker image will be made available too.

Bug Fixes :fire:

  • Scaffold: Set correct root path when only one platform was selected (#65)
  • Scala.js: Compatibility with Bloop 1.4.0+ (#71, #97)
  • Bsp: Log correct line and column numbers (#73)
  • ArtefactResolution: Fix resolution of test modules (#85)
  • BuildConfig: Detect invalid references on platform modules (#86)
  • ArtefactResolution: Fix publishing and resolution of Scaladoc bridges (#88)
  • Publish: Honour progress bar setting (#89)
  • Publish: Use absolute path when determining Git version (#93)
  • BuildTarget: Resolve exception when no parent modules available (#95)
  • ArtefactResolution: Fix inheritance on test modules (#96)

More robust resolution (#77)

Previously, all dependencies were resolved at once. Modular projects are likely to contain libraries with diverging versions across different modules. A Coursier resolution pass merges these duplicate libraries, only retaining the latest version. This may lead to unexpected compile- and runtime behaviour. The new resolution logic solves this limitation by performing a separate resolution pass for each module. As a consequence of these changes, the resolution will be slightly slower, but the speed is still acceptable on larger projects.

Improvements :star:

  • BuildTarget: Expose source paths as environment variable (#87)
  • Scaffold: Add option for MUnit testing framework (#94)

0.1.6

4 years ago

Release Summary :pencil:

Version 0.1.6 fixes numerous bugs, stabilises the generation of IDEA projects and improves error reporting for invalid build files.

You can follow the linked pull requests for a detailed description of the changes.

Migration Steps :computer:

Use the following command to upgrade Seed:

blp-coursier bootstrap \
    -r bintray:tindzk/maven \
    tindzk:seed_2.12:0.1.6 \
    -f -o seed

Next, make sure you have Bloop v1.3.2 installed. Although builds generated by this Seed release are compatible with v1.3.4, the Bloop version in the Docker image could not be upgraded due to a regression.

This release is fully backward-compatible.

Bug Fixes :fire:

  • BuildConfig: Avoid duplicate class paths (#49)
  • IDEA: Set correct module dependencies (#52)
  • IDEA: Fix generation of projects with mixed Scala options (#53)
  • IDEA: Set JavaDoc and source paths on compiler libraries (#54)
  • IDEA: Fix generation of non-JVM projects (#55)
  • Bloop: Fix classpath of modules with transitive dependencies (#61)
  • Scaffold: Set correct root path when only one platform was selected (#65)

Improvements :star:

  • BuildConfig: Give hint when using wrong syntax for test modules (#50)
  • BuildConfig: Detect cyclic module dependencies (#51)
  • BuildConfig: Check compatibility of target platforms (#56, #62)

0.1.5

4 years ago

Release Summary :pencil:

Version 0.1.5 includes usability improvements and fixes a number of bugs. This release adds support for code generation via custom build targets. Finally, all project-level settings are available on modules now.

You can follow the linked pull requests for a detailed description of the changes.

Migration Steps :computer:

Use the following command to upgrade Seed:

blp-coursier bootstrap \
    -r bintray:tindzk/maven \
    tindzk:seed_2.12:0.1.5 \
    -f -o seed

Next, make sure you have Bloop v1.3.2 installed.

This release is fully backward-compatible.

New Features :rocket:

Improved CLI output (#26)

The CLI output was redesigned to be more succinct and readable. It uses Unicode symbols to indicate the log levels. Messages make better use of colours which allow to identify warnings or errors faster. See the following screenshots for a comparison.

Before: old

After: new

If you would like to partially revert to the old behaviour, you can set unicode to false in the seed.toml configuration file:

[cli]
unicode = false

Also, the minimum log level can be configured now. The new CLI settings are described here.

Custom build targets (#19)

Previously, you had to write shell scripts in order to build non-Scala artefacts. This proved difficult when artefacts were built in multiple dependent modules and had to be copied over to the root project's build path. Now you can define custom build targets on modules and run commands as part of the build process. For example, if you would like to copy font assets to your build path, you can include the following definition:

[module.template.target.fonts]
root    = "fonts"
command = "cp -Rv fonts $BUILD_PATH"

Besides spawning commands, you can run any main class defined in the project. For instance, to generate a JSON file for your Scala.js application, you could write a script and reference it in a build target:

[module.layouts.target.js-bundle]
root  = "layouts"
class = ["keyboard:jvm", "keyboard.Bundle"]

Since we set the root path on these two modules, Seed will also generate IDEA modules for them.

You can inherit these build targets via moduleDeps. Whenever app is linked (seed link app), the build targets will be run too. Note that like regular modules, build targets are inherited transitively.

[module.app.js]
moduleDeps = ["template", "layouts"]
# ...

If you would like to only run a specific build target, a new CLI command (build) was introduced:

seed build template:fonts

For more information, please refer to the documentation.

Module-level build settings (#45)

Until now, every build required a [project] section which defined global build settings. Since 0.1.5, these settings are available on modules too.

Instead of:

[project]
scalaVersion       = "2.11.11"
scalaNativeVersion = "0.3.7"

[module.demo.native]
sources = ["src/"]

You could write:

[module.demo.native]
scalaVersion       = "2.11.11"
scalaNativeVersion = "0.3.7"
sources            = ["src/"]

As a consequence, you can define scalaOptions on a base module and set additional Scala options on platform modules. For example:

[module.demo]
scalaOptions = ["-Yliteral-types"]

[module.demo.js]
scalaOptions = ["-P:scalajs:sjsDefinedByDefault"]

This means that every module is compiled exactly with the Scala version and options it was defined with. Therefore, it is not possible to depend on modules which have an incompatible Scala version. Including a 2.12 module in a 2.13 module will trigger an error henceforth.

Bloop: Populate resolution modules (#37)

This change is the first step towards supporting the Metals language server (see #15). Previously, the resolution modules were not populated which prevented code navigation. If you would like to generate this Bloop section, set the following option in seed.toml:

[resolution]
optionalArtefacts = true

For more information, please refer to the documentation.

Bug Fixes :fire:

  • IDEA: Set language level for Scala library (#20)
  • ProcessHelper: Exit when command returned with non-zero code (#25)
  • Package: Skip entries that were already added to the JAR file (#28)
  • Fix inheritance of compiler plug-ins (#29)
  • BuildTarget: Create build path if it does not exist (#32)
  • Bloop: Fix output path of submodules (#33)
  • MavenCentral: Fix parsing of library artefacts (#34)
  • Scaffold: Only return compatible compiler versions (#35)
  • SemanticVersioning: Fix parsing of large pre-release versions (#41)
  • BuildConfig: Only include modules with same platform in classpath (#43)
  • IDEA: Do not skip modules that only have test sources (#44)
  • BuildConfig: Fix inheritance of settings on test modules (#46)

Improvements :star:

  • Implement custom build targets (#19)
  • Build: Upgrade Alpine Linux base image to v3.10 (#21)
  • Refactor build path logic (#22)
  • README: Add Gitter badge (#24)
  • Improve CLI output (#26)
  • Improve scaffold command (#27)
  • Build all test projects in temporary folder (#31)
  • Use ZIO instead of Futures (#36)
  • Bloop: Populate resolution modules (#37)
  • Add scalafmt configuration and reformat code (#40)
  • Cli: Add --optimise parameter to link command (#42)

0.1.4

4 years ago

Release Summary :pencil:

Version 0.1.4 implements a server mode and fixes a couple of inheritance-related bugs. The Docker image comes with the latest Bloop which is compatible with Scala 2.13.

You can follow the linked pull requests for a detailed description of the changes.

Migration Steps :computer:

Use the following command to upgrade Seed:

blp-coursier bootstrap \
    -r bintray:tindzk/maven \
    tindzk:seed_2.12:0.1.4 \
    -f -o seed

Next, upgrade Bloop to v1.3.2.

This release is fully backward-compatible.

New Features :rocket:

You can now link modules directly from Seed:

  • seed link <module> This will link all platform modules
  • seed link <module>:js This will link only the JavaScript module

The second new feature is the ability to run Seed in server mode (seed server). You can use the server as a message bus and trigger linking from the IDE or the command line. At the same time, you can have multiple event listeners that subscribe to build status events, for example in order to reload the web page or browser extension after your build completed.

For more information, please refer to the documentation.

Bug Fixes :fire:

  • Honour Scala version mandated by modules (#11)
  • Bloop: Inherit javaDeps from parent modules (#13)

Improvements :star:

  • Drone CI: Only publish when pushing to master or releasing a version (#12)
  • Upgrade all dependencies (#14)

0.1.3

5 years ago

Release Summary :pencil:

Version 0.1.3 implements two new features, a number of bug fixes and improved test coverage. You can follow the linked pull requests for a detailed description of the changes.

Migration Steps :computer:

Use the following command to upgrade Seed:

blp-coursier bootstrap \
    -r bintray:tindzk/maven \
    tindzk:seed_2.12:0.1.3 \
    -f -o seed

This release is fully backward-compatible.

New Features :rocket:

Expose artefact version tag in TOML build file (#8)

On scalaDeps, you can now specify a fourth parameter for the version tag. For example, this allows you to include dependencies that target specific Scala versions:

scalaDeps = [
  ["org.scalameta", "interactive", "4.1.0", "full"]
]

Add support for compiler plug-ins (#9)

With the new compilerDeps setting you can depend on compiler plug-ins in your build:

[module.macros.js]
compilerDeps = [
  ["org.scalamacros", "paradise", "2.1.1", "full"]
]

A complete cross-compiled example can be found here.

Bug Fixes :fire:

  • Bloop: Set correct dependencies on meta modules (#3)
  • IDEA: Fix path normalisation (#5)
  • IDEA: Fix dependency resolution of platform dependencies (#6)
  • Inherit target platforms from parent module (#7)

Improvements :star:

  • Drone CI: Move testing logic to separate pipeline (#4)
  • Drone CI: branch is not available for tag events (5f48fa54a4b736fc61489efb2ee6f5674cc2ed56)
  • Build: Use unannotated Git tags as version numbers (1e5676af95951cba0aee79cedbc4d103e838816e)