- Add support for
asm-options
andasm-sources
(see #573)
- Allow
Cabal-3.12.*
- Support
base >= 4.20.0
(Imports
does not re-exportData.List.List
)
- Don't infer
Paths_
-module withspec-version: 0.36.0
or later
- Add (undocumented)
list
command
- Add
--canonical
, which can be used to produce canonical output instead of trying to produce minimal diffs - Avoid unnecessary writes on
--force
(see #555) - When an existing
.cabal
does not align fields then do not align fields in the generated.cabal
file. - Fix a bug related to git conflict markers in existing
.cabal
files: When a.cabal
file was essentially unchanged, but contained git conflict markers thenhpack
did not write a new.cabal
file at all. To address thishpack
now unconditionally writes a new.cabal
file when the existing.cabal
file contains any git conflict markers.
- Depend on
crypton
instead ofcryptonite
- Add support for
ghc-shared-options
- Allow
Cabal-3.8.*
- Additions to internal API
- Add support for
language
(thanks @mpilgrem) - Accept Cabal names for fields where Hpack and Cabal use different
terminology, but still warn (e.g. accept
hs-source-dirs
as an alias forsource-dirs
)
- Support
Cabal-3.6.*
- Make sure that verbatim
import
fields are rendered at the beginning of a section (see #486)
- Add
Paths_
module toautogen-modules
whencabal-version >= 2
- Compatibility with
aeson-2.*
- Render
default-extensions
/other-extensions
line-separated - Compatibility with
Cabal-3.4.0.0
- Ignore duplicate source directories (see #356)
- Do not infer duplicate modules (see #408, #406, #353)
- Reject empty
then
/else
sections (see #362) - Omit conditionals that are always
false
from generated.cabal
file (see #404) - Infer correct
cabal-version
whenPaths_
is used withRebindableSyntax
andOverloadedStrings
orOverloadedLists
(see #400) - Do not use indentation from any existing
.cabal
file if it is invalid (e.g.0
) (fixes #252) - Accept lists for
tested-with
(see #407) - Render current directory as
./
instead of./.
for forward compatibility with future version of Cabal
- Accept subcomponents as dependencies (close #382)
- Fix a bug in
github: ...
introduced with0.34.0
(f63eb19b956517b4dd8e28dc5785be5889a99298)
- Use
PreferNoHash
as defaultGenerateHashStrategy
- Add support for library
visibility
(see #382) - Reject URLs for
github
-
Add
GenerateHashStrategy
. The default isPreferHash
for0.33.0
and will change toPreferNoHash
with0.34.0
. See #390) for details. -
Add command-line options
--hash
and--no-hash
- Silently ignore missing hash when the cabal file content didn't change at all (for forward compatibility with #390)
- Support GHC 8.8.1:
fail
is no longer a part ofMonad
. Instead, it lives in theMonadFail
class. Adapting our code to this change meant changing the types of exporting functions, unfortunately, hence the major version bump.
- Support Cabal 3.0
- Switch reexported-modules to comma-separated list
- Add default value for maintainer (see #339)
- Escape commas and spaces in filenames when generating cabal files
- Show the header when printing to stdout (see #331)
- Add help for
--numeric-version
(see #337)
- Add
mixin
to the fields read by dependencies when they are objects (see #318) hpack
now returns with a successful exit code if the.cabal
file is up to date, even if it was generated by a newer version ofhpack
.
- Warn on duplicate fields (see #283)
- Always render
cabal-version
asx.y
instead of>= x.y
so thatcabal check
does not complain (see #322) - Extend
build-tools
so that it subsumes Cabal'sbuild-tools
andbuild-tool-depends
(see #254) - Add support for
system-build-tools
- Keep declaration order for literal files in c-sources (and other fields that accept glob patterns). This is crucial as a workaround for https://ghc.haskell.org/trac/ghc/ticket/13786 (see #324)
- Expose more stuff from
Hpack.Yaml
so that it can be used by third parties
- Add
spec-version
(see #300)
- Fix a regression related to indentation sniffing (close #310)
- Desugar ^>= when dependency is a string (see #309)
- Add support for Apache, MPL and ISC when inferring
license
(see #305)
- Desugar
^>=
for compatibility withCabal < 2
(see #213) - Add support for GPL, LGPL and AGPL when inferring
license
(see #305)
- Add missing
extra-source-files
(see #302)
- Infer
license
fromlicense-file
- Put the
cabal-version
at the beginning of the generated file. This Is required withcabal-version: 2.1
and higher. (see #292) - With
cabal-version: 2.1
or higher omit>=
when rendering (see #292) - Require
cabal-version: 2.2
when SPDX license identifiers are used (see #292) - Map cabal-style licenses to SPDX license identifiers when
cabal-version
is 2.2 or higher (see #292)
- Exit with
exitFailure
onAlreadyGeneratedByNewerHpack
orExistingCabalFileWasModifiedManually
inHpack.printResult
- GHC 8.4.1 compatibility
- Add support for
cxx-options
andcxx-sources
(see #205) - Add support for
data-dir
(see #100) - Generate valid
.cabal
files whenverbatim
is used top-level (see #280)
- Local defaults are now resolved relative to the file they are mentioned in, not the CWD that hpack is invoked from.
- Major refactoring of the exposed API (much cleaner now, but lot's of breaking changes!)
- Remove Git conflict markers before checking the hash of any existing
.cabal
files (equivalent togit checkout --ours
). This allows to regenerate the.cabal
file on conflicts when rebasing without passing-f
in some cases and helps with preserving the formatting. - Allow local files to be used as defaults (#248)
- Keep non-existing literal files on glob expansion (see #101)
- Add support for
verbatim
Cabal escape hatch - Allow
version
be a numbers - Ignore fields that start with an underscore everywhere, not just globally
- Add support for custom decoders to allow for alternate syntax (e.g. Dhall)
generated-exposed-modules
andgenerated-other-modules
, for populating theautogen-modules
field (#207).- Corrected
cabal-version
setting forreexported-modules
inside a conditional.
- Add support for
defaults
- Add
--numeric-version
- Add support for
signatures
extra-doc-files
requires settingcabal-version
to at least 1.18; this is now done properly.- Accept bool for
condition
(see #230)
- Fix a bug in module inference for conditionals (see #236)
- Add support for
extra-doc-files
. - Add support for
pkg-config-dependencies
- Allow dependency constraints to be numbers (see #234)
- Accept section-specific fields in conditionals (see #175, thanks to Scott Fleischman)
- New section:
internal-libraries
, for Cabal 2's internal libraries (see #200).
- Do not overwrite any existing cabal file if it has been modified manually
- Add support for
frameworks
andextra-frameworks-dirs
- Compatibility with
Glob >= 0.9.0
- Add
IsList
instance forDependencies
- Add Paths_* module to executables (see #195, for GHC 8.2.1 compatibility)
- Allow specifying dependencies as a hash (see #198)
- Output generated cabal file to
stdout
when-
is given as a command-line option (see #113) - Recognize
.chs
,.y
,.ly
and.x
as Haskell modules when inferring modules for
- Make
executable
a shortcut ofexecutables: { package-name: ... }
- Add support for
ghcjs-options
andjs-sources
(see #161) - Allow
license-file
to be a list - Accept input file on command-line (see #106)
- Add Paths_* when no modules are specified (see #86)
- Do not descend into irrelevant directories when inferring modules (see #165)
- Added custom-setup section
- Add support for
!include
directives
- Warn when
name
is missing - Support globs in
c-sources
- Use binary I/O for cabal files avoiding problems with non-UTF-8 locales
- Fix rendering of
.
as directory (cabal syntax issue)