Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Aug 29, 2024
    • 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
  2. Aug 28, 2024
  3. Aug 27, 2024
  4. Aug 26, 2024
  5. Aug 25, 2024
  6. Aug 24, 2024
  7. Aug 23, 2024
  8. Aug 22, 2024
  9. Aug 20, 2024
  10. Aug 19, 2024
  11. Aug 16, 2024
    • mergify[bot]'s avatar
      Merge pull request #10250 from alt-romes/wip/romes/10046 · 969343a7
      mergify[bot] authored
      hpc: Don't cover non-dependency libraries
    • Rodrigo Mesquita's avatar
      hpc: Don't cover non-dependency libraries · c3b8cee3
      Rodrigo Mesquita authored
      We were passing the flag --coverage-for for every library in the package
      when building the testsuites.
      
      However, if a particular testsuite doesn't depend on one of the packages
      passed with --coverage-for we would crash.
      
      Since we look for the unit ids of all packages given in --coverage-for in the
      package database (to find hpc artifacts), if the testsuite builds before
      the library this lookup would fail.
      
      The fix is easy: don't pass --coverage-for=<lib> to <testsuite> if
      <testsuite> doesn't depend on <lib>. If <lib> is an indirect dependency
      of <testsuite> it'll no longer be covered by HPC, but this is a weird
      behaviour that I doubt anyone relies on.
      
      Fixes #10046
      Verified
      c3b8cee3
  12. Aug 15, 2024
  13. Aug 13, 2024
  14. Aug 11, 2024
Loading