Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Feb 28, 2024
  2. Feb 27, 2024
  3. Feb 25, 2024
    • mergify[bot]'s avatar
      Merge pull request #9683 from mpickering/wip/package-db-fix · 9025af59
      mergify[bot] authored
      cabal-install: Clarify the semantics of package-db flag
      9025af59
    • Matthew Pickering's avatar
      cabal-install: Clarify the semantics of package-db flag · d626ef87
      Matthew Pickering authored
      In this PR we make the `--package-db` flag apply only to the default
      immutable initial package stack rather than also applying to the store
      package database.
      
      There are two special package databases which cabal install knows about
      and treats specially.
      
      * The store directory, a global cache of installed packages where cabal
        builds and installs packages into.
      * The inplace directory, a local build folder for packages, where cabal
        builds local packages in.
      
      It is very important that cabal registers packages it builds into one of
      these two locations as there are many assumptions that packages will end
      up here.
      
      With the current design of the `--package-db` flag, you are apparently
      allowed to override the store location which should have the effect of
      making the last package database in the package stack the "store"
      directory. Perhaps this works out in theory but practically this
      behaviour was broken and things were always registered into the store
      directory that cabal knew about. (The assertion in
      `ProjectBuilding.UnpackedPackage` was failing (see added test)).
      
      With `--package-db` not being able to modify the location of the store
      directory then the interaction of `--package-db`, `--store-dir` and
      `--dist-dir` flags become easy to understand.
      
      * `--package-db` modify the initial package database stack, these
        package database will not be mutated by cabal and provide the initial
        package environment which is used by cabal.
      * `--store-dir` modify the location of the store directory
      * `--dist-dir` modify the location of the dist directory (and hence
        inplace package database)
      
      Treating the flags in this way also fix an assertion failure when
      building packages.
      
      Fixes #9678
      d626ef87
  4. Feb 24, 2024
  5. Feb 23, 2024
  6. Feb 22, 2024
  7. Feb 21, 2024
    • mergify[bot]'s avatar
      Merge pull request #9543 from mpickering/wip/autogen · 517ddc63
      mergify[bot] authored
      Modularise writeAutogenFiles
      517ddc63
    • sheaf's avatar
      Refactor autogen modules · 6d4faba9
      sheaf authored
      This commit modularises the logic for generation of autogenerated files
      and autogenerated modules.
      6d4faba9
    • sheaf's avatar
      SuffixHandler: add Suffix newtype · 65905b98
      sheaf authored
      This commit adds a Suffix newtype to describe suffixes as handled
      by suffix handlers & preprocessors, and changes the PPSuffixHandler
      type definition to use it.
      
      It also moves some type definitions from Distribution.Simple.PreProcess
      to the new module Distribution.Simple.PreProcess.Types.
      
      As this commit changes the definition of PPSuffixHandler, it will
      break custom Setup scripts which use the 'hookedPreProcessors'
      functionality.
      65905b98
  8. Feb 18, 2024
    • mergify[bot]'s avatar
      Merge pull request #9707 from alt-romes/wip/romes/9697-nonlocal-test · 2acae632
      mergify[bot] authored
      Add test cabal install remote-pkg for #9697
      2acae632
    • Rodrigo Mesquita's avatar
      Add test cabal install remote-pkg for #9697 · b1ff71fc
      Rodrigo Mesquita authored
      In #9697 we fixed passing local options to cabal install targets, but
      rebasing accidentally dropped one of the added the tests for that PR,
      which tested cabal install <target>, where <target> was only available
      from a remote repository.
      b1ff71fc
    • mergify[bot]'s avatar
      Merge pull request #9470 from mpickering/wip/whyLegacy · 285dac27
      mergify[bot] authored
      cabal-install: justify why legacy-fallback is used
      285dac27
    • Rodrigo Mesquita's avatar
      cabal-install: justify why legacy-fallback is used · 2fd137b1
      Rodrigo Mesquita authored
      This commit makes it so that cabal-install can explain the reason why
      it used the legacy fallback, instead of building per-component.
      2fd137b1
    • mergify[bot]'s avatar
      Merge pull request #9706 from andreabedini/refactor/cmd-install · ccab6d15
      mergify[bot] authored
      Refactor CmdInstall / fix bug in #9697
      ccab6d15
    • Andrea Bedini's avatar
      Refactor CmdInstall · 7b1746f7
      Andrea Bedini authored
      CmdInstall.installAction is ~300 lines long and full of nested scopes
      and ad-hoc logic. This change hopes to make it more readable and
      understandable.
      
      - Lift withProject and withoutProject out of installAction and split
        their relative concerns. E.g. not parsing URIs is installAction's
        concern not withProject's (which would just return a constant []).
      - Split an intermediate step into a separate function, resolveTargetSelectorsInProjectBaseContext.
      - Reuse withGlobalConfig and specFromPkgId (renamed from pidPackageSpecifiers).
      - Avoid trying withProject a second time in case no target is specified.
      - Fix a bug introduced in 802a326f where
        establishProjectBaseContext is called in a non-project setting. Also
        simplify its original implementation by moving the change into
        withProject rather than calling establishProjectBaseContext a second
        time.
      - Document the interaction between cabal v2-install and local configuration
        and add few comments.
      7b1746f7
  9. Feb 17, 2024
    • mergify[bot]'s avatar
      Merge pull request #9673 from alt-romes/wip/romes/globbing · fe82d9bc
      mergify[bot] authored
      Merge two Globbing Modules and Fix #5349
      fe82d9bc
    • Rodrigo Mesquita's avatar
      Merge the two Globbing modules in cabal and cabal-install · e2019f5a
      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
      e2019f5a
  10. Feb 13, 2024
  11. Feb 11, 2024
  12. Feb 10, 2024
  13. Feb 09, 2024
    • mergify[bot]'s avatar
      Merge pull request #9697 from alt-romes/wip/romes/7297-8909-7236 · f1da5d86
      mergify[bot] authored
      Apply local configuration to install targets
      f1da5d86
    • Rodrigo Mesquita's avatar
      Apply local configuration to install targets · 802a326f
      Rodrigo Mesquita authored
      The target of `cabal install` is not considered to be a local package,
      which means local configuration (e.g. in cabal.project, or flags like
      --enable-profiling) does not apply to it.
      
      In 76670ebd, we changed the behaviour to
      applying the local flags to cabal install targets, but it used the
      literal target string as a package name to which the flags were
      additionally applied.
      
      However, `cabal install` targets are NOT necessarily package names, so,
      e.g., if we did `cabal install exe:mycomp`, the local flags would not
      apply since "exe:mycomp" is not a recognized /package/.
      
      The solution is to parse the target selectors first, and apply the local
      flags to the package of the resolved targets.
      
      Fixes #7297, #8909, the install part of #7236, #8529, #7832
      802a326f
  14. Feb 08, 2024
Loading