Skip to content

0.15.1

Compare
Choose a tag to compare
@davesmith00000 davesmith00000 released this 16 Oct 23:20
· 264 commits to main since this release

Bug fix release

Indigo 0.15.0 included the biggest changes to the Indigo plugins, more or less since they were created, and with that... a couple of bugs, too.

Issue with fullLinkJS in sbt

At the point when Scala.js switched naming from fullOpt to fullLinkJS and fastOptJS to fastLinkJS, the output files and paths were changed, and work was done to support both the old and new arrangements in sbt and Mill. Unfortunately an issue has crept in with fullLinkJS's output file not be found correctly. This has now been resolved.

Mill Indigo Plugin Generators were inadequate...

Before any release, Indigo goes through quite a lot of testing, but not enough on this occasion. After the release of 0.15.0, two issues quickly became apparent with how the new generators worked with Mill, specifically.

  1. mill clean <module> was not removing generated classes. This wasn't noticed because during plugin development, a lot of "hard cleaning" (i.e. removing the out directory) happens to be sure of what has been loaded, and in that scenario, mill clean has no work to do.
  2. Working with generators on multi-module builds was terrible, because unlike the sbt version, all the generated files were being written to a common shared output folder, instead of a folder that was part of each module's build.

The fix for both was to make generators adhere to Mill's T.dest, which is obvious in hindsight... oh well...

Reformulating the plugin's a little to make this work properly now requires the following changes (taken from real examples):

Mill

Before:

val indigoGenerators: IndigoGenerators =
  IndigoGenerators
    .mill("snake.generated")
    .listAssets("Assets", indigoOptions.assets)
    .generateConfig("SnakeConfig", indigoOptions)

After:

val indigoGenerators: IndigoGenerators =
  IndigoGenerators("snake.generated")
    .listAssets("Assets", indigoOptions.assets)
    .generateConfig("SnakeConfig", indigoOptions)

sbt

Before:

IndigoGenerators
  .sbt((Compile / sourceManaged).value, "pirate.generated")
  .listAssets("Assets", pirateOptions.assets)
  .generateConfig("Config", pirateOptions)
  .embedAseprite("CaptainAnim", baseDirectory.value / "assets" / "captain" / "Captain Clown Nose Data.json")
  .toSourceFiles
  .toSet

After:

IndigoGenerators("pirate.generated")
  .listAssets("Assets", pirateOptions.assets)
  .generateConfig("Config", pirateOptions)
  .embedAseprite("CaptainAnim", baseDirectory.value / "assets" / "captain" / "Captain Clown Nose Data.json")
  .toSourceFiles((Compile / sourceManaged).value)
  .toSet