Release 0.9
Highlights
-
The minimum supported Bazel version is now v0.24.
The version is available from
nixpkgs unstableand via
official releases. -
Initial Windows support
A non-trivial subset of
rules_haskellis now working on Windows.
See theproject tracker
for finished and ongoing work. -
Improved OSX support
Due to the
mach-oheader size limit, we took extra measures to
make sure generated library paths are as short as possible, so
linking haskell binaries works even for large dependency graphs. -
Better Bindist support
The default
startscript sets up a
bindist-based project by default.rules_nixpkgsis no longer a required dependency of
rules_haskell(but can still be used as backend). -
Full Haskell–C–Haskell Sandwich
A
haskell_librarycan be now be used nearly anywhere a
cc_librarycan.The old
cc_haskell_importandhaskell_cc_importwrapper rules
are no longer necessary and have been deprecated. -
Greatly improved REPL support
A new
haskell_replrule allows to load multiple source targets by
source, or compiled, as needed. Example usage:haskell_repl( name = "my-repl", # Collect all transitive Haskell dependencies from these targets. deps = [ "//package-a:target-1", "//package-b:target-2", ], # Load targets by source that match these patterns. include = [ "//package-a/...", "//packaga-b/...", "//common/...", ], # Don't load targets by source that match these patterns. exclude = [ "//package-a/vendored/...", ], ) -
Support for GHC plugins
Each
haskell_*rule now has apluginsattribute. It takes a
list of bazel targets, which should behaskell_librarys that
implement the GHC plugin
specification. -
Initial Code Coverage support
Measure coverage of your Haskell code. See the “Checking Code
Coverage”
section in the manual.
Compatibility Notice
hazel was merged into
rules_haskell, but
we are not yet certain about the exact interface we want to expose.
hazel is therefore not included in this release, and we can’t
guarantee the original, unmerged version is compatible with this
release. If you depend on hazel, please use a recent master commit
of rules_haskell.
Changed
-
haskell_register_ghc_bindistsis no longer re-exported from
//haskell/haskell.bzl.
You must now load that macro from//haskell:nixpkgs.bzl. -
rules_nixpkgsis no longer a dependency ofrules_haskell. -
haskell_importhas been renamed tohaskell_toolchain_library.
This is a substantial breaking change. But adapting to it should be
as simple assed -i 's/^haskell_import/haskell_toolchain_library/' **/BUILD{,.bazel} sed -i 's/"haskell_import"/"haskell_toolchain_library"/' **/BUILD{,.bazel}See #843.
-
haskell_toolchain’s tools attribute is now a list of labels.
Earlier entries take precendence. To migrate, add[]around your
argument.
See #854. -
The default outputs of
haskell_libraryare now the static and/or
shared library files, not the package database config and cache
files.
Added
haskell_replrule that constructs a ghci wrapper that loads
multiple targets by source.
See #736.pluginsattribute tohaskell_*rules to load GHC plugins.
See #799.- The
HaskellInfoandHaskellLibraryInfoproviders are now
exported and thus accessible by downstream rules.
See #844. - Generate version macros for preprocessors (
c2hs,hsc2hs).
See #847. bindist_toolchainrule getshaddock_flagsandrepl_ghci_args
attributes.@repltargets write json file with build information, usable by
IDE tools.
See #695.
Deprecated
haskell_cc_import; usecc_libraryinstead.
See #831.cc_haskell_import; just usehaskell_librarylike acc_library.
See #831.