Releases: Dreksh/rules_elm
Fixes to compilation errors causing subsequent runs to fail
Bazel does some cleanup steps after runs have terminated, and the compilations were unable to complete safely if another build fails (I've only encountered this when I'm building multiple Elm apps). This left dangling files in the directories which Bazel moves / modifies to trigger errors if those files were opened.
This might be considered a hacky fix, but I've added the temporary directory as an output of the rule, so that Bazel will handle it gracefully for our build script not to fail on subsequent runs.
To use this version, add this to the MODULE.bazel file:
bazel_dep(name = "rules_elm", version = "1.0.1-alpha1")
archive_override(
module_name = "rules_elm",
integrity = "sha256-LFSvLiVWahLkGdWi17CkD6K+/V9lOXzdZYqBlt4E+nQ=",
strip_prefix = "rules_elm-1.0.1-alpha1",
urls = ["https://github.com/Dreksh/rules_elm/archive/refs/tags/v1.0.1-alpha1.tar.gz"],
)
Added some tools
bazel run @rules_elm//tools:update-bazel-deps
Sets up the elm repository dependencies
bazel run @rules_elm//tools:init-app <path from workspace root>
Sets up the given directory path with a elm.json, in preparation for it having the elm_binary rule.
The elm.json is useful for tracking dependencies
bazel run @rules_elm//tools:install-deps <path from workspace root> [libraries...]
Adds the libraries into elm.json. Recommended to run bazel run @rules_elm//update-bazel-deps after performing this step.
To use this version, add this to the MODULE.bazel file:
bazel_dep(name = "rules_elm", version = "1.0.1-alpha")
archive_override(
module_name = "rules_elm",
integrity = "sha256-nJQm3cyxbigkpq61qcP542FXPqUetfj8PbQL4r3HFKg=",
strip_prefix = "rules_elm-1.0.1-alpha",
urls = ["https://github.com/Dreksh/rules_elm/archive/refs/tags/v1.0.1-alpha.tar.gz"],
)
Add Bazel Module
Instead of relying on WORKSPACE, you can now add it into your modules via:
bazel_dep(name = "rules_elm", version = "1.0.0")
archive_override(
module_name = "rules_elm",
integrity = "sha256-24SiOXYSBR+2YRk2utkG/DbzdFEYd2FNvWDuyQzA7IM=",
strip_prefix = "rules_elm-1.0.0",
urls = ["https://github.com/Dreksh/rules_elm/archive/refs/tags/v1.0.0.tar.gz"],
)