This project is mirrored from https://github.com/haskell/Cabal.
Pull mirroring updated .
- Feb 17, 2024
-
-
Rodrigo Mesquita authored
We use the datatype representation from the globbing in cabal-install, but preserve a standalone parser for globs present in cabal files, whose specification is constrained by the cabal specification. The implementations are merged taking the best parts of each. We also make sure sdist is robust to accidentally-listed directories, as the refactor of the globbing modules re-uncovered this issue, and required a prompt fix for the refactor not to break some things. Fixes #5349
-
- Feb 07, 2024
-
-
f-a authored
-
- Jan 17, 2024
-
-
Javier Sagredo authored
-
- Jan 11, 2024
-
-
sheaf authored
The aim of this commit is to modularise LocalBuildInfo to better reflect implicit invariants. The top-level split data LocalBuildInfo = NewLocalBuildInfo { localBuildDescr :: LocalBuildDescr , localBuildConfig :: LocalBuildConfig } reflects which part of a LocalBuildInfo are set in stone by Cabal (the LocalBuildDescr), while LocalBuildConfig contains options that can be controlled/modified by the user in some way. The split data LocalBuildDescr = LocalBuildDescr { packageBuildDescr :: PackageBuildDescr , componentBuildDescr :: ComponentBuildDescr } reflects that some parts of the information determined at configuration time resides at the package level, while other pieces of information are pertinent to individual components. Finally the structure of LocalBuildConfig is aimed to reduce code duplication between the Cabal library and cabal-install.
-
- Jan 10, 2024
-
-
f-a authored
* Introduce `-i/--ignore` command-line option. e.g. cabal check --ignore=missing-upper-bounds will not display “Missing upper bounds” warnings. * Additionally, a filterPackageChecksById function is now exported in Distribution.PackageDescription.Check.Warning; this can be used by third party tools. * Add CheckExplanationIDString to `cabal check` messages. e.g. from Error: The 'license' field is missing or is NONE. to Error: [license-none] The 'license' field is missing or is NONE. This makes using the cabal check `--ignore` option more immediate. * Spool `MissingField` into separate constructors. Introducing five new constructors for `CheckExplanation` MissingFieldCategory MissingFieldMaintainer MissingFieldSynopsis MissingFieldDescription MissingFieldSynOrDesc This provides better ergonomic for `cabal check --ignore` and makes it easier to update the manual if the need arises. * Add tests for desiderable `--ignore` string qualities (not too long, without too many '-', unique). * Warn when `--ignore` string is not recognised. Also add a test for this. * Add documentation. * Add changelog.
-
- Jan 07, 2024
-
- Dec 19, 2023
-
-
Phil de Joux authored
-
- Dec 18, 2023
-
-
Rodrigo Mesquita authored
This commit re-designs the mechanism by which we make the .mix files of libraries available to produce the Haskell Program Coverage report after running testsuites. The idea, for the Cabal library, is: * Cabal builds libraries with -fhpc, and store the hpc artifacts in build </> `extraCompilationArtifacts` * At Cabal install time, `extraCompilationArtifacts` is copied into the package database * At Cabal configure time, we both - receive as --coverage-for flags unit-ids of library components from the same package (ultimately, when #9493 is resolved, we will receive unit ids of libraries in other packages in the same project too), - and, when configuring a whole package instead of just a testsuite component, we determine the unit-ids of libraries in the package these unit-ids are written into `configCoverageFor` in `ConfigFlags` * At Cabal test time, for each library to cover (stored in `configCoverageFor`), we look in the package database for the hpc dirs, which we eventually pass along to the `hpc markup` call as `--hpcdir` flags As for cabal-install: * After a plan has been elaborated, we select the packages which can be covered and pass them to Cabal's ./Setup configure as --coverage-for=<unit-id> flags. - Notably, valid libraries are non-indefinite and non-instantiations, since HPC does not support backpack. - Furthermore, we only include libraries in the same package as the component being configured, despite possibly there being more library components in other packages of the same project. When #9493 is resolved, we could lift this restriction and pass all libraries local to the package as --coverage-for. See `determineCoverageFor` and `shouldCoverPkg` in Distribution.Client.ProjectPlanning. Detail: We no longer pass the path to the testsuite's mix dirs to `hpc markup` because we only ever include modules in libraries, which means they were previously unused. Fixes #6440 (internal libs coverage), #6397 (backpack breaks coverage), doesn't yet fix #8609 (multi-package coverage report) which is tracked in #9493, and fixes in a new way the previously fixed #4798, #5213.
-
f-a authored
* Add `cabal-version` 3.12 * Add test for #9331 - `cabal check`: Guard Paths_* behind `cabal-version: 3.12` or higher, “fail” and “succeed” tests. - `cabal build`: Guard Paths_* behind `cabal-version: 3.12` or higher, “fail” test. * Guard PackageInfo behind cabal-version ≥ 3.12 --------- Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
-
- Dec 12, 2023
-
-
f-a authored
-
- Dec 02, 2023
-
-
Phil de Joux authored
Remove MIN_VERSION_base(4,7,0) as can't build anyway before ghc-8.4
-
Artem Pelenitsyn authored
It seems, GHC 9.8 changed something in the code generation for data types. Structured class is supposed to catch such cases.
-
- Nov 29, 2023
-
-
Matthew Pickering authored
I noticed that Distribution.Utils.TempTestDir was only used in the testsuite but defined in the Cabal library. Rather than expose this in the public interface of the `Cabal` library, it is cleaner to refactor it into a separate library (`Cabal-tests`) which can be used by any testsuite component. Also, in future it gives a clearer place to put utility functions which need to be shared across the testsuite but not exposed in Cabal. Cabal-tests can also freely add dependencies (such as exceptions) which we might want to avoid adding to the Cabal library. Fixes #9453
-
- Nov 18, 2023
-
-
glaubitz authored
Previously, sparc64 was defined as an alias for the 32-bit SPARC architecture which was true while SPARC mainland was mostly 32 bits. More recently, 64-bit SPARC has become a port of its own, so it needs to be treated as a separate architecture.
-
- Nov 13, 2023
-
-
f-a authored
* Fix Semigroup target instance When two target names are the same, `mappend`ing them should not error but just pick the first name. * Add `desugarBuildToolSimple` * Reimplement cabal check * Reorder test output * Fix autogen modules tests .cabal files * Add a number of tests * Add test for #7423 i.e. Do not warn on -O2 if under off-by-default package configuration flag conditional. * Add a regression for: * Add another -WErrr test This is to make sure we do *not* report it if it is under a user, off-by-default flag. * Add test for non manual user flags. * Add “absolute path in extra-lib-dirs” test * Add if/else test * Add “dircheck on abspath” check * Add Package version internal test * Add PackageVersionsStraddle test * Add changelog for #8427 * Integrate various reviews * Integrate Artem’s review (review) Clarify `combineNames` documentation By explaining the way it operates (working if the two names are equal or one is empty) and renaming the function from `combineName` to `combineNames`. (review) Use guards instead of if/then/else (review) Match inside argument list (review) Replace “white” with “allow” (review) Fix typo in comment (review) Fix typo in Check module documentation (review) Harmonise indentation for `data` decls First field goes in a new line than the data constructor, so we have more space. (review) Rename `Prim` module to `Types` (review) Add checkPackageFilesGPD `checkPackageFiles` — which works on PD — was used to perform IO. We introduce a function that does the same thing but works on GPD (which is more principled). `checkPackageFiles` cannot just be removed, since it is part of the interface of Distribution.PackageDescription.Check. Deprecation can be planned once “new check” is up and running. * Integrate Andreas’ review (review) Add named section to missing upper bound check “miss upper bound” checks will now list target type and name (“On executable 'myexe', these packages miss upper bounds”) for easier fixing by the user. (review) remove `cabal gen-bounds` suggestion Reasonable as `cabal gen-bounds` is stricter than `cabal check`, see https://github.com/haskell/cabal/pull/8427#issuecomment-1446712486 Once `gen-bounds` behaves in line with `check` we can readd the suggestion. (review) Do not warn on shared bounds When a target which depends on an internal library shares some dependencies with the latter, do not warn on upper bounds. An example is clearer library build-depends: text < 5 ⁝ build-depends: myPackage, ← no warning, internal text, ← no warning, shared bound monadacme ← warning! * Integrate Artem’s review /II (review) Split Check.hs Check.hs has been split in multiple file, each une sub 1000 lines: Check 857 lines Check.Common 147 lines Check.Conditional 204 lines Check.Monad 352 lines Check.Paths 387 lines Check.Target 765 lines Check.Warning 865 lines Migration guide: - Check GPD/PD checks plus work-tree checks. - Check.Common common types and functions that are *not* part of monadic checking setup. - Check.Conditional checks on CondTree and related matter (variables, duplicate modules). - Check.Monad Backbone of the checks, monadic inter- face and related functions. - Check.Paths Checks on files, directories, globs. - Check.Target Checks on realised targets (libraries, executables, benchmarks, testsuites). - Check.Warning Datatypes and strings for warnings and severities. (review) remove useless section header (review) Fix typo (review) Add warnings documentation (list) For each warning, we document constructor/brief description in the manual. This might not be much useful as not but it will come handy when introducing `--ignore=WARN` and similar flags. * (review Andreas) Clarify CheckExplanation comment Whoever modifies `CheckExplanation` data constructors needs to be aware that the documentation in doc/cabal-commands.rst has to be updated too. * Move internal Check modules to `other-modules` No need to expose Distribution.PackageDescription.Check.* to the world. API for checking, for cabal-install and other tools, should be in Distribution.PackageDescription.Check. * Make fourmolu happy Cabal codebase has now a formatter/style standard (see #8950). “Ravioli ravioli, give me the formuoli” * Do not check for OptO in scripts See #8963 for reason and clarification requests. * Remove useless PackageId parameter It is now in the Reader part of CheckM monad. * Do not check PVP on internal targets Internal: testsuite, benchmark. See #8361. * Make hlint happy * Fix #9122 When checking internal version ranges, we need to make sure we are not mistaking a libraries with the same name but from different packages. See #9132. * Fix grammar neither…nor, completing what done in #9162 * Integrate Brandon’s review: grammar * Remove unnecessary `-fvia-C` check Brandon’s review/II. --------- Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
-
- Nov 02, 2023
-
-
andreas.abel authored
-
- Sep 08, 2023
-
-
lrzlin authored
-
- Sep 04, 2023
-
-
hamishmack authored
-
- Jul 02, 2023
-
-
Felix Yan authored
* Add support for the 64-bit RISC-V architecture * Update hashes in tests as instructed * Fix changelog syntax --------- Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
-
- Jun 22, 2023
-
-
This is affect of using indentOfAtLeast method: any indentation greater than current offset is fine. That behavior is desirable to parsing multiline field contents, but it is a bit surprising for fields, which we expect to be aligned. Such insonsistency seems to be always a mistake, and it's easy to fix once a machine points it out.
-
- Jun 14, 2023
-
-
Jessica Hamilton authored
-
- Jun 10, 2023
-
-
Krzysztof Gogolewski authored
-
- May 28, 2023
-
-
There are several parts to this patch which are logically distinct but work together to support the overal goal of starting a GHCi session with multiple packages loaded at once. 1. When a user writes "cabal repl <target>" then if the user is using a compiler > ghc-9.4.* then we will attempt to start a multi-session which loads the selected targets into one multi-package session of GHC. 1a. The closure property states that in order to load components `p` and `q` into the same session that if `p` depends on `z` and `z` depends on `q` then `z` must also be loaded into the session. 1b. Only inplace packages are able to be loaded into a multi session (if a component `z` exists then it is already made into an inplace package by cabal). Therefore cabal has already engineered that there is source code locally available for all packages which we will want to load into a session. 2. The solver is unmodified, the solver is given the repl targets and creates a build plan as before. After the solver is completed then in `setRootTargets` and `pruneInstallPlan` we modify the install plan to enforce the closure property and mark which dependencies need to be promised. * Mark the current components as `BuildInPlaceOnly InMemory`, which indicates to the compiler that it is to be built in a GHC multi-session. * Augment the component repl targets to indicate that components required by the closure property (in addition to normal targets) will be loaded into the repl. * Modify the dependency edges in `compLibDependencies` to indicate which dependencies are the promised ones (which is precisely components which are `BuildInPlaceOnly InMemory` build styles). This is the field which is eventually used to populate the `--dependency` argument to `./Setup configure`. Fixes #8491
-
- May 25, 2023
-
-
Bodigrim authored
-
- Apr 26, 2023
-
-
Sylvain Henry authored
We use a Latin1 generated parser with Alex, but we also parses Unicode BOM, unbreakable spaces, etc. In recent Alex, the reported column isn't expressed in Unicode chars anymore but in bytes/ASCII chars (probably due to https://github.com/haskell/alex/commit/ae525e34edf017544e8ef4457d7e57cf2081dcf9 but I haven't checked), which broke our tests (see https://github.com/haskell/cabal/pull/8896). To work around this we report indentation warnings at token start position, instead of token end position (i.e. always 1). Otherwise position makes no sense anymore for the user.
-
- Apr 01, 2023
-
-
Artem Pelenitsyn authored
-
- Feb 23, 2023
-
-
Hécate Moonlight authored
* Disallow GHC <8.0 closes #8715 * Add changelog entry
-
- Feb 19, 2023
-
-
f-a authored
Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
-
- Jan 20, 2023
-
-
Andreas Klebinger authored
-
- Jan 05, 2023
-
-
Sergey Vinokurov authored
* Add changelog entry * Add test * Remove "'-main-is' is not portable" check * Fix test Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
-
- Dec 04, 2022
-
-
Jappie Klooster authored
* Add check for upper bound on any package fixes https://github.com/haskell/cabal/issues/8291 presumably this will make it nag at anyone for forgetting to add upper bounds to their packages. add changelog (presumably) wait what? move toDependencyVersionsMap to utils section add nicer error message simplify checking logic, add more comments only emit missing upper bounds if bigger then one don't add bound to internal libraries filter out self from the dependency map I think this is an external library so it needs an upper bound now? add test for multilib fix test suite by ignoring the warning ... probably not the best approach change link to pvp instead of parsonsmatt better wording on missing upper bound error remove spurious parenthesis change map creation from monad to list comprehension use foldmap to get rid of maybe, fix compile error rewrite from do notation to list comprehension fix test suite failing fix compile error factor out double filter call in a && expression * set expectation * Modify test so it gives a list of expected libs rename public-multilib-3 to all-upper-bound the test had little to do with multilib. * Update comment on ignoring warnigns * use map instead of if * Undo map change add comment on why that doesn't work * Add description and maintainer fields * make description longer then synopsis in all-upper-bound.cabal
-
- Oct 09, 2022
-
-
Vladislav Zavialov authored
-
- Sep 30, 2022
-
-
Ross Paterson authored
* add TypeData language extension (ghc proposal 106) * changelog entry for PR 8493 * add TypeData to cabal.vim * update MD5 hashes * Update changelog.d/pr-8493 adjusted wording Co-authored-by:
Artem Pelenitsyn <a.pelenitsyn@gmail.com> * add DeepSubsumption as suggesterd by Artem Pelenitsyn * update MD5sums Co-authored-by:
Artem Pelenitsyn <a.pelenitsyn@gmail.com>
-
Athas authored
* Move towards using XDG directories. * Install binaries in $HOME/.local/bin. * Fix tests. * Ensure config file is where it should be. * Require newer directory for XdgState. * Put world file in XDG_STATE_HOME. * Oops, forgot to import. * Remove uses of getCabalDir. * These all need directory-1.3.7.0 now. * Oh right, not a builtin anymore. If this works I will also change the other .json files. * Try it by hand. * Haskell is better than JSON. * Bump directory in all jsons. * Put directory first. * Let us assume that getConfigFilePath gets this right. * Implement backwards compatibility. * This is now elsewhere. * We need to create parents as well because ~/.local might not exist. * Put scripts-build in distinct cache directory. * Document XDG behaviour. * Remove help text references to ~/.cabal. * Remove references to .cabla/bin. * Backwards compatible install paths. * Remove more references to ~/.cabal. * Fix typo. * Fix ~/.cabal paths making their way into default config. * Reduce duplication. * Add changelog entry. * Also note install dir change. * It is the cabal-install config file. * Avoid dependending on cabal-install in Hackage-tests. * ALso respect CABAL_DIR here. * Try leaving InstallDirs alone. * Also need duplication here. * Add missing newline. * Fix doc typos. * Make this a Haddock comment. * Revision field must not be null. * Link directories. * Update doc/config.rst Co-authored-by:
Artem Pelenitsyn <a.pelenitsyn@gmail.com> * No need for this. * We install foreign libraries here now. * Clarify Nothing case. * Avoid using ~/.config/cabal in manual. Co-authored-by:
Mikolaj Konarski <mikolaj@well-typed.com> Co-authored-by:
Artem Pelenitsyn <a.pelenitsyn@gmail.com>
-
- Aug 31, 2022
-
-
Alexey Radkov authored
* Remove warning on option -threaded when building libraries Fixes #8431. Accompanied by option -flink-rts, option -threaded defines the flavour of the ghc RTS library the built library will be linked against. Note that bare ghc does not warn when option -threaded is used for building a library either. * Cabal no longer warns on -threaded option when building libraries Note that this commit modifies regression check for issue #774. * A small changelog was added
-
- Aug 07, 2022
-
-
Musab Guma'a authored
-
- Jul 28, 2022
-
-
andreas.abel authored
-
- Jun 15, 2022
-
-
f-a authored
-
- May 30, 2022
-
-
f-a authored
GenericPackageDescription and LocalBuildInfo MD5 changed, as KnownExtensions was modified.
-
- May 25, 2022
-
-
Mikolaj Konarski authored
and one other `cabal check` complaint.
-