17 KiB
Change Log
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
[0.9.1] - 2019-06-03
Fixed
- Bindists were broken on MacOS. See 884.
[0.9] - 2019-05-07
Highlights
-
The minimum supported Bazel version is now v0.24.
The version is available from
nixpkgs unstableand viaofficial releases. -
Initial Windows support
A non-trivial subset of
rules_haskellis now working on Windows. See theproject trackerfor 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 ofrules_haskell(but can still be used as backend). -
Full Haskell–C–Haskell Sandwich
A
haskell_librarycan be now be used nearly anywhere acc_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_argsattributes.@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.
Fixed
- Support protobuf roots in
haskell_proto_library. See #722. - Made GHC bindist relocatable on *nix. See #853.
- Various other fixes
[0.8] - 2019-01-28
- The minimum supported Bazel version is now v0.21.
Added
haskell_register_toolchains,haskell_register_ghc_bindistsandhaskell_register_ghc_nixpkgsto register multiple toolchains for multiple platforms at once. Toolchains from binary distributions can now coexist with toolchains from Nixpkgs, even on the same platform. On nixpkgs you need to provide a toolchain. See theREADMEfor instructions. See #597 and #610.- Instructions on how to reference a local checkout of
rules_haskell. rules_haskellis forward-compatible with the next breaking changes inbazelversions, via the--all_incompatible_changesflag. See #613.
Removed
- The
generate_soattribute ofhaskell_binaryandhaskell_testhas been completely superseded bylinkstaticin the last release and became a no-op, so it is removed. - The
main_fileattribute ofhaskell_binaryandhaskell_testhad been deprecated because it was a no-op, so it is removed. - The
prebuilt_dependenciesattribute of all haskell rules had been deprecated two versions ago and is removed. Usehaskell_importinstead (see docs for usage). - The
extra_binariesfield is now no longer supported.
Changed
ghc_bindistnow requires atargetargument. Usehaskell_register_ghc_nixpkgsto callghc_bindistonce per known target. See #610.ghc_bindistnow registers itself as a toolchain. We no longer require a separate toolchain definition and registration in addition toghc_bindist. See #610.c2hssupport is now provided in a separate toolchain calledc2hs_toolchain, rather than an optional extra to thehaskell_toolchain. See #590.- Rename bindist arch names so they are the same as in
rules_go/nodejs.
Fixed
- Prevent duplicate installs of bazel_skylib See #536.
- Test suite now executes all binaries, various runtime errors were uncovered. See #551.
- Repl targets that have indirect cc_library dependencies. See #576.
linkstaticfor haskell binaries that have an indirect dependency on a prebuilt haskell package. See #569.- … and an indirect dependency on a C library. See #567.
- Prefer linking agains static C libraries with
linkstatic. See #587. - Haddock flags take precedence over GHC compiler flags. See #572.
- User-defined GHC flags now override default flags. See #607.
- Dynamic transitive C(++) libraries work. See #627.
[0.7] - 2018-12-24
Added
- Support for Bazel 0.20.0. This is now also the lower bound for the supported version.
- Supported reexported modules, via the
new
exportsattribute. See #357. - Support
linkstaticattribute, for building mostly static binaries. This is now the default for binaries, to match the C/C++ rules defaults. See #378. - It is now possible to set default Haddock flags in the toolchain definition. See #425.
- Support wrapping Haskell libraries as shared objects callable from Python. See #370.
Changed
- REPL targets have changed name. If you have a library target
foo, then the corresponding REPL target is now calledfoo@repl. It was previously calledfoo-repl. The old name is still supported but is deprecated. - Don't set a default version number anymore in libraries and binaries. Version numbers, and CPP version macros, are now only used for packages imported from Hackage. Don't use them otherwise. See #386, #414 and #446.
- On macOS, we use
arfor linking, not Libtool. See #392. - The
runfilesHaskell library has been broken out into a Cabal library and published on Hackage.
Fixed
- Make REPL force building of dependencies. See #363.
- Don’t crash on inputs missing
.haddockinterface files. See #362 - Fix handling of non-unique package names. See #403.
[0.6] - 2018-07-21
Added
-
Protocol buffers integration using
proto-lens. See #239. -
strip_include_prefixattribute to thehaskell_cc_importrule. See #241. -
Support for
c2hsfiles. See #351. -
The
extra_srcsattribute that allows to list non-Haskell source files that should be visible during compilation and linking (usually useful with TH). See #292. -
The
extra_binariesattribute to thehaskell_toolchainrule. See #282. -
A Haskell library for looking up runfiles. See #302.
-
A separate toolchain for
doctest—haskell_doctest_toolchain. See #310. -
The
compiler_flagsattribute to thehaskell_toolchainrule allowing to specify default compiler flags. See #315. -
The ability to set locale to be used during compilation by adding the
localeandlocale_archiveattributes tohaskell_toolchain. See #328. -
Proper support for profiling. See #332.
-
The
repl_ghci_argsattribute to thehaskell_toolchainrule. See #334. -
The
haskell_importrule allowing us to make specifying dependencies more uniform and to deprecate theprebuilt_dependenciesattribute. See #337.
Fixed
-
Template Haskell linking against
cc_library. See #218. -
Linking issues on MacOS. See #221.
-
GHC packages that correspond to targets with the same name but in different Bazel packages no longer clash. See #219.
-
Build breakage on MacOS when XCode is not installed. See #223.
-
Bug preventing Haddock generation because of missing dynamic shared libraries when targets have TH in them. See #226.
-
Hyperlinks between targets contained in different Bazel packages (Haddocks). See #231.
-
Generated source files do not cause issues now. See #211.
-
dataattributes now allow files in them. See #236. -
Bug when headers and hsc2hs-produced files were not visible to Haddock. See #254.
-
Bug preventing using genrule-produced headers via
haskell_cc_import. See #268. -
Bug that allowed us avoid specifying certain
prebuilt_dependenciesif they were already specified for transitive dependencies. See #286. -
Bug that was making modules generated from
.hscand.chsfiles and generated modules in general not available in the REPLs. See #323.
Changed
-
Added
-Wnoncanonical-monad-instancesto default warnings inhaskell_lint. -
How REPLs work. Now there is an optional output per binary/library. Its name is the name of target with
-repladded. Users can then build and run such a REPL for any defined target. See #220 and #225. -
The
haskell_docrule now produces self-contained documentation bundle with unified index. See #249. -
haskell_lintnow only lints direct dependencies. See #293. -
haskell_doctesthas been re-designed. It's now a normal rule that works only on direct dependencies and allows to specify modules which should be tested, pass custom flags todoctestexecutable. See #342. -
The
prebuilt_dependenciesattribute ofhaskell_binaryandhaskell_libraryhas been deprecated. See #355.
[0.5] - 2018-04-15
Added
-
Support for MacOS, courtesy of Judah Jacobson. See #165.
-
Support for
dataattributes inhaskell_binaryandhaskell_libraryrules. See #167. -
Output on building of GHC bindists so it's clearer what went wrong in case of a failure.
-
haskell_replrule allowing to interact with GHCi. See #82. -
Support for GHC 8.4.1 bindist. See #175.
-
haskell_lintrule. See #181. -
haskell_doctestrule. See #194.
Changed
-
Improved hermeticity of builds. See #180.
-
cc_haskell_importnow works withhaskell_binarytargets as well. See #179.
[0.4] - 2018-02-27
Added
hidden_modulesattribute of thehaskell_libraryrule. This allows to selectively hide modules in a library. See #152.
Fixed
-
Test executables now find shared libraries correctly at runtime. See #151.
-
Building of certain modules does not fail with the “file name does not match module name” message anymore. See #139.
-
Linking issues that resulted in unresolved symbols due to incorrect order in which static libraries are passed to linker are not resolved. See #140.
-
The “grep not found” error is fixed. See #141.
-
System-level shared libraries introduced by
haskell_cc_importare now found correctly during compilation. See #142.