Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Sep 15, 2024
  2. Sep 14, 2024
    • f-a's avatar
      Changelogs 3.14 (#10338) · 93db940a
      f-a authored
      * Bumpo “Redefine `build-type: Configure`” importance
      
      * Move “`pkg-config` error message” entry
      
      to “Other changes”
      
      * Fix typo
      
      * cabal file → `.cabal` file
      
      * Remove #9702 from `cabal-install` changelog
      
      It is invisible to `cabal-install` user
      
      * Changelog: add OrPatterns extension
      
      * Changelog: add SPDX note
      
      * Make release notes for cabal-install 3.14
      
      We are after all releasing cabal-install 3.14
      
      * Fix SPDX entry
      
      We are not doing the sensible thing anymore.
  3. Sep 12, 2024
  4. Sep 10, 2024
  5. Sep 02, 2024
  6. Sep 01, 2024
  7. Aug 31, 2024
  8. Aug 29, 2024
    • Matthew Pickering's avatar
      Add test for --working-dir and hsc2s · addcd41c
      Matthew Pickering authored
      Before the previous patches this test failed because an incorrect path
      was passed to hsc2hs (a preprocessor), it now succeeds :)
      addcd41c
    • Matthew Pickering's avatar
      Test --working-dir in the testsuite · ff7b4c10
      Matthew Pickering authored
      When testing `./Setup` only, when `withDirectory` is used, instead of
      changing into that directory when invoking processes, we now use the
      `--working-dir` flag and keep a fixed CWD.
      
      This will therefore passively test that `--working-dir` is working
      
      In addition, it makes it possible to test things easily such as
      `--working-dir` with a relative path as an argument. `cabal-install`
      will only invoke `--working-dir` with an absolute path and hence is
      isolated from any double interpretation issues.
      
      Testing against these double interpretation issues is very important as
      it also prevents over-interpretation of relative paths into absolute
      paths. Passing absolute paths to tools such as hsc2hs can lead to the
      build directory leaking into an interface file which leads to
      non-reproducible results.
      ff7b4c10
    • Matthew Pickering's avatar
      Remove last uses of runDbProgram · 0c817876
      Matthew Pickering authored
      runDbProgram doesn't take into account the working directory (so will
      normally produce incorrect results when used in `Cabal`). This replaces
      the last uses which weren't found by testing, they were found by
      grepping.
      0c817876
    • Matthew Pickering's avatar
    • Matthew Pickering's avatar
      Introduce AbsolutePath to symbolic path abstraction · 027bddfc
      Matthew Pickering authored
      There are a few places where paths are known to be absolute. This
      enforces that in the type system by introducing a simple wrapper to
      `Distribution.Utils.Path`.
      
      ```
      newtype AbsolutePath (to :: FileOrDir) = AbsolutePath (forall from . SymbolicPath from to)
      ```
      
      The nice thing about this abstraction is when when a path is unwrapped,
      due to the universally quantified `from` type, the resulting
      `SymbolicPath` can be used with any API which expects a path to point
      `from` a specific directory.
      027bddfc
    • Matthew Pickering's avatar
      Replace FilePath in PackageDB with SymbolicPath in Cabal · 90fbf086
      Matthew Pickering authored
      This refactoring enforces a simple property
      
      * We use symbolic paths in Cabal in order to represent that paths to
        package databases. These paths is relative to the package root.
      * We use normal filepaths in cabal-install to represent the path to a
        package database. These are relative to the current working directory.
      
      Paths are explicitly converted from one type to the other at the
      interface of `cabal-install` and `Cabal`, see `setupHsConfigureArgs` for
      where this happens.
      
      In order to achieve this `PackageDB` is abstracted over what the type of
      filepaths a specific package db points to.
      
      ```
      type PackageDBX fp = ... | SpecificPackageDB fp | ...
      ```
      
      If you are using the Cabal library then you probably want to migrate to
      use `PackageDBCWD` and `PackageDBStackCWD`.
      
      ```
      type PackageDBCWD = PackageDBX FilePath
      type PackageDBStackCWD = [PackageDBCWD]
      ```
      
      Then at the point where you call commands in the `Cabal` library convert
      these paths into paths relative to the root of the relevant package.
      The easiest way to do this is convert any paths into an absolute path.
      
      This patch fixes a double interpretation issue when the `--working-dir`
      option was used and package db paths were offset incorrectly.
      90fbf086
    • Matthew Pickering's avatar
      Interpret argument to `--gen-pkg-config` relative to `--working-dir` · 08f028fb
      Matthew Pickering authored
      This fixes the --gen-pkg-config to use the symbolic path abstraction, in
      turn this ensures that we interpret the path appropiately when
      `--working-dir` is also set.
      08f028fb
    • Matthew Pickering's avatar
      clean: Fix usage of flags vs flags' · 31f96d5e
      Matthew Pickering authored
      This fixes a simple oversight where the flags were passed without
      updating the `--working-dir` argument appropiately.
      31f96d5e
    • Matthew Pickering's avatar
      Fix Cabal macro bound in test · a22fc082
      Matthew Pickering authored
      It is only on Cabal 3.13 that the symbolic path abstraction was
      introduced.
      
      On CI we only test with Cabal master so the incorrect bound wasn't
      picked up.
      a22fc082
  9. Aug 28, 2024
  10. Aug 27, 2024
  11. Aug 26, 2024
  12. Aug 25, 2024
Loading