Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal.git. Pull mirroring updated .
  1. 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
  2. Feb 13, 2024
  3. Feb 11, 2024
  4. Feb 10, 2024
  5. 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
  6. Feb 08, 2024
  7. Feb 07, 2024
  8. Feb 03, 2024
  9. Feb 01, 2024
    • mergify[bot]'s avatar
      Merge pull request #9680 from cabalism/test/project-hop-imports · 663e98f8
      mergify[bot] authored
      Add tests for project imports and constraint version conflicts
      663e98f8
    • mergify[bot]'s avatar
      Merge pull request #9635 from mpickering/wip/test-runner-env · bd0dae73
      mergify[bot] authored
      Don't inherit package database to tests
      bd0dae73
    • Matthew Pickering's avatar
      testsuite: Fix Executable-Relocatable test package database location · b39b94b5
      Matthew Pickering authored
      We were attempting to register a package into the global package
      database, which then triggered some other check to do with relocatable
      packages to fail.
      
      The fix is to initialise and use a local package database, so the
      package would be built and installed into the local package database.
      b39b94b5
    • Matthew Pickering's avatar
      Don't inherit package database to tests · dbe5cf42
      Matthew Pickering authored
      I can't think of a reason why it would be desirable to expose the user's
      cabal store or local dist-newstyle to the test runner. In fact, this can
      break test output in certain situations depending on what is in your
      store.
      
      Tests should run in as hemertic environment as possible and not
      depend on anything to do with external system configuration.
      
      I have introduced a Note [Testsuite package environments] which explains
      what the environments are for the three different components of the
      testsuite.
      
      {- Note [Testsuite package environments]
      
      There are three different package environments which are used when running the
      testsuite.
      
      1. Environment used to compile `cabal-tests` executable
      2. Environment used to run test scripts "setup.test.hs"
      3. Environment made available to tests themselves via `./Setup configure`
      
      These are all distinct from each other and should be specified separately.
      
      Where are these environments specified:
      
      1. The build-depends on `cabal-tests` executable in `cabal-testsuite.cabal`
      2. The build-depends of `test-runtime-deps` executable in `cabal-testsuite.cabal`
         These dependencies are injected in a special module (`Test.Cabal.ScriptEnv0`) which
         then is consulted in `Test.Cabal.Monad` in order to pass the right environmnet.
         This is mechanism by which the `./Setup` tests have access to the in-tree `Cabal`
         and `Cabal-syntax` libraries.
      3. No specification, only the `GlobalPackageDb` is available (see
         `testPackageDBStack`) unless the test itself augments the environment with
         `withPackageDb`.
      
      At the moment, `cabal-install` tests always use the bootstrap cabal, which is a
      bit confusing but `cabal-install` is not flexible enough to be given additional
      package databases (yet).
      
      -}
      dbe5cf42
    • Phil de Joux's avatar
      Add noncyclical tests that hop over folders · 78fcdc68
      Phil de Joux authored
      - Allow for bad behaviour of master branch
      - Add cyclical checks with same file names and hops
      - Add cyclical import tests with 1 and 2 hops in cycle
      - Expected output has project with full project path
      - Add newlines at EOF
      78fcdc68
  10. Jan 31, 2024
  11. Jan 30, 2024
  12. Jan 29, 2024
    • mergify[bot]'s avatar
      Merge pull request #9665 from cabalism/test/project-cyclical-import · e268c0a7
      mergify[bot] authored
      Add further tests of cyclical project imports
      e268c0a7
    • mergify[bot]'s avatar
      Merge pull request #9602 from alt-romes/wip/romes/cabal-9389 · 1bab3716
      mergify[bot] authored
      Refactor the core component building logic: gbuild vs buildOrReplLib
      1bab3716
    • Rodrigo Mesquita's avatar
      Refactor the core component building logic · 2decb0e7
      Rodrigo Mesquita authored
      1. Refactors the duplicated `buildExtraSources` function from `gbuild` and
          `buildOrReplLib` into a standalone monadic computation in the context of
          building a component. This refactor allows
          us to share the code for building an extra source amongst the two
          functions.
      
      2. Creates a new module Distribution.Simple.GHC.Build.Modules which, in the
          same spirit as ...GHC.Build.ExtraModules, defines an action which builds
          all the Haskell modules of the component being built.
      
          This function clarifies and re-implements the logic of building Haskell
          modules in the different possible ways, while accounting for
          Template Haskell special "way requirements", which was previously
          duplicated in a non-obvious manner in gbuild and buildOrReplLib.
      
          The Note [Building Haskell modules accounting for TH] in that module
          explains the big picture, and the implementation is re-done in light of
          it.
      
      3. Re-work the linker invocations, focusing on preserving existing
      behaviour before simplifying or fixing bugs any further.
      
      Fixes #9389.
      2decb0e7
    • Rodrigo Mesquita's avatar
    • Phil de Joux's avatar
      Add cyclical import tests with 1 and 2 hops in cycle · 3f92ac66
      Phil de Joux authored
      - Assert on exact cyclical import failure message
      - Add logging and assertOutputContains to cyclical tests
      - Use a different naming convention for cyclical import tests
      - Use "self" in naming
      - Show import tree
      3f92ac66
    • Phil de Joux's avatar
    • mergify[bot]'s avatar
      Merge pull request #9650 from alt-romes/wip/romes/9640 · 72a91600
      mergify[bot] authored
      Don't build unnecessary targets of legacy-fallback deps.
      72a91600
    • Rodrigo Mesquita's avatar
      Don't build unnecessary targets of legacy-fallback deps. · e8c9d194
      Rodrigo Mesquita authored
      The refactor in f70fc980 solved an
      inconsistency in `buildAndInstallUnpackedPackage`. Namely, before the
      refactor, we didn't pass `hsSetupBuildArgs` to the build invocations,
      and afterwards we did.
      
      The result is that build targets of (legacy) package `B`, that a package
      `A` depends on, are now passed to the ./Setup build invocation of
      package `B` (e.g. `./Setup build lib:openapi3` rather than just `./Setup
      build`).
      
      This means we no longer /build always all targets of a legacy-package/
      (for example, the lib, the testsuites and the executables).
      Instead only the required target (just the lib) will be built.
      
      However, despite now passing the build args to `./Setup build`, we
      weren't passing the same arguments to the `./Setup copy` invocation.
      Therefore, `./Setup copy` would also try to copy targets of the package
      that weren't built, resulting in a failure.
      
      This fixes that failure by correctly passing the build targets to the
      `./Setup copy` invocation, just like we do for the `./Setup build` one.
      
      Fixes #9640
      e8c9d194
Loading