cabal-install-3.8.1.0
cabal-install 3.8.1.0 Changelog
Significant changes
Cabal-3.8.1.0is used, which brings its own set of changes, many of which are significant.Expose
cabal-installas library #1597 #3781 #4798 #6090 #7224 #7358Split out package
cabal-install-solvercabal initrewrite #1074 #6758 #6864 #7251 #7255 #7256 #7273Restructures the
cabal initcommand to fix historical issues. All flags are preserved.- Codebases for interactive and non-interactive flags are disentangled.
- Data structures now exploit relevant stanza structure and formatters only care about stanza data.
- Heuristics and prompts have a pure and impure implementation.
Sets default behavior to be
--interactiveas opposed to--non-interactive.Rewrites tests to achieve 98% coverage
- Golden files now test every stanza individually.
- Every flag is covered by a unit test.
- Interactive, simple, and non-interactive workflows are covered.
Conditionals and imports in
cabal.projectfiles #7556 #7783cabal.projectfiles now allow conditional logic on compiler version, arch, etc. as well as imports of other local or remote project of freeze files (both old and new style).Changes to
cabal v2-configure#5591 #7180 #7405 #7402- removes the
--dry-runpart of thev2-configurecommand. now the command only generates a cabal.project.local. to get the old functionality back, runcabal v2-build --dry-runafter (or instead of, if generating cabal.project.local is not needed)v2-configure - add
--enable-appendand--disable-appendflags tov2-configure, which toggle the option for the new configuration to be appended to the old config file - add
--enable-backupand--disable-backupflags tov2-configure, which toggle the backup feature for the configuration file
- removes the
Better support for scripts #5508 #5698 #6149 #6354 #7073 #7842 #7851 #7925 #7938 #7990 #7997
- Script support improved or added across relevant commands.
cabal run scriptwill now cache results and will not do a fresh build every time.cabal build scriptadded: It will build the cache for script.cabal repl scriptadded: It will open a repl for script using the cache if available.cabal clean scriptadded: It will clean the cache for script.cabal cleanwill now remove script caches for which there is no marching script.cabal list-binnow works with scripts- The name of the generated script executable has been changed from "script" to
"cabal-script-
" for easier process management. - Reduce the default verbosity of scripts, so that the build output doesn't interfere with the script output.
- Scripts now support a project metadata block that allows them to use options that would normally be set in a cabal.project file.
cabal-install-solver: Backtrack when no pkg-config is present #7448 #7621When solving for pkgconfig-depends, when pkg-config is not present, the cabal solver will now backtrack and try a different automatic flag and dependency configuration, just as it does if pkg-config is present, but does not contain the specified package.
Apply local options only to local packages #7998 #7973
- Command-line
ghc-optionsonly applies to local packages program-optionsstanza only applies to local packages
- Command-line
Other changes
Remove
worldfile functionality #6767 #7746In
v1-install,worldwas used to trace what packages have been installed, and re-install everything that is listed in it on-demand. However, inv2-install, this is no longer needed, and outdated. Additionally,worldcode-path is probably not up-to-date, remove it instead of having partial features.Don't generate
worldfile in~/.cabalwhenv1-installis executed.Don't ever read
worldfrom~/.cabal.Remove meta-target
worldfromv1-install.
A default configuration is no longer written when a config file is given explicitly #7705 #7715
When no config file exists,
cabalcommands will create a default one.This behavior is discontinued now when the config file is given explicitly via the
--config-fileoption or theCABAL_CONFIGenvironment variable.If no config file is given explicitly, and the default config file (relative to
CABAL_DIR) does not exist, it is created as it used to be.
Use
nroff -man | lessinstead ofmanas backend forcabal man#7714 #7726The previous implementation of
cabal manusedmanas backend to view the generated manpage file. However, macOS' and BSD'smandoes not accept a file as input, socabal manwas broken on macOS and BSD.The issue has been fixed by piping the generated manpage through
nroff -manand then into$PAGERwhich defaults toless. Thus,cabal mannow works both on Linux and macOS/BSD.NB:
cabal manrequiresnroffto be installed which is the case for standard setups (but may not be case on slim setups like VMs used in CI). Note thatnroffis not necessarily a prerequisite of a package containingman.Use
Win32 >= 2.8to getWin32.sYNCHRONIZE#7835 #7982#7982 also completes a changelog entry for
Cabal-3.6.1.0, noting it is required forcabal-install >= 3.6.Add
preferred-versionssupport forLocalIndexRepo#7294 #7295- Previously, the only repo-index-type that reads the preferred-versions file was
RepoRemote.LocalIndexReponow also supports parsingpreferred-versionsfile, main purpose is to write tests. As a nice side-effect, users can provide their own overlay over package sets to restrict or prefer certain package versions.
- Previously, the only repo-index-type that reads the preferred-versions file was
Add
preferred-versionssupport forcabal outdated#5603 #7249 #7296cabal outdatedhonours thepreferred-versionsfile which might deprecate or prefer certain versions of packages. In particular, if the only newer version of a package has been deprecated,cabal outdatedshould not report that there are newer versions available.
Standalone tests for
cabal init#7410 #7424- change the behaviour of the
--testsflag forcabal init, see https://github.com/haskell/cabal/issues/7410#issuecomment-849913926 - add a new value
TestSuitefor thePackageTypetype
- change the behaviour of the
cabal outdated --v2-freeze-fileprints error message if no freeze file can be found #7406 #7440Instead of ignoring a missing
.freezefile, abort execution and print an error message.Make
cabalrespectsetgidpermission bit when creating directories #7560 #7572- Previously
cabalwould override an admin's choice to use setgid on the.cabaldirectory by using hardcoded file and directory modes upon creation. Instead we now take what the system decides and only add to that set of permissions.
- Previously
Glob expand
extra-source-fileswhen tracking for rebuild #4746 #7608- Since 3.4,
extra-source-fileshave been tracked by cabal-install in the rebuild-checking logic. However, this tracking did not, until this PR, take into account glob-expansion.
- Since 3.4,
Improve error message when no test/benchmark is found #5079 #5255 #7834
When
cabal testand the error message recommends settingtests: True, the nextcabal testrun is likely to fail with a solver error. The user might incorrectly conclude that settingtests: Truemade the problem worse, because the failure now occurs earlier (at solving time rather than at testing time).By including the fact that a plan failure is expected in the error message, hopefully users will be more confident that setting
tests: Truewas the right move, so they will be able to focus on the true cause of the problem: the fact that no plan including the tests exists.Remove
Distribution.Client.Compat.FilePerms#7948- Remove the module
Distribution.Client.Compat.FilePerms, since it's both dead code and duplicates code fromDistribution.Compat.CopyFile.
- Remove the module
Avoid malformed range requests #5952 #7970
- Don't send malformed range requests. Should make fetching from head.hackage and other "unstable" overlays more reliable.
Improve error message for empty
--allow-newer=#7740 #8140Instead of internal error, the message now explains that empty argument for
--allow-newer=is not allowed and reminds what--allow-newer(with the empty argument) means.cabal checknow fails when no upper bounds forbaseorCabalare present in setup dependencies #4683 #5370 #7409Fix that cabal v2 commands (
install,repl,run) use duplicate global config and rebuild libs twice in the store #6907 #7753 #7759--repl-no-loadoption skips startup modules load in REPL #7541 #7578Fix post-checkout-command crash when 0 exit status bug #7641 #7847
Fix
list-binto only choose the selected component #7679 #7791cabal sdistworks in projects withextra-packages#7698Ensure that
v2-sdistcommand respects the--ignore-projectflag #7965 #8109Add "prompt" strategy when symlinking binaries. #5672
Add a verbosity flag
+nowarn, to suppress all warnings #7286 #7470Lazily decode cache files for checking invalidation #7466 #7516
Defer
build-tools-dependschoices as well as setup choices #7532 #7561Support Git submodules in
source-package-repository#5536 #7625Add support for
--package-dbflags to v2 commands #5773 #7676cabal initnow takes an optional argument and treats it as root directory for the new package #7871 #7873Silence warning about
world-file field being unrecognised for flat config files #7894 #7903Fix the timestamp shown during
cabal update#7934Sync darcs repos #7137
cabal-install-solver: Provide more context in error messages #7468 #7473- Error messages for misspelled extensions and languages now provide additional context.
- The error messages will provide a suggested fix if the misspelled extension or language is similar enough to known languages and extensions.
cabal init -i should autodetect author name and maintainer email (fix #8255) #8255 #8267
Automatically pipe auth from repo uris into curl transport. #4743 #7630
Build release archives (and validate) with GHC 9.2.3 #8271 #8272
- The release binaries are now built with GHC 9.2.3, which fixes some minor snags
