Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Jun 15, 2024
    • sheaf's avatar
      configureRequiredProgram: take care if program already configured · c6a26d48
      sheaf authored
      In configureRequiredProgram, we would unconditionally configure the
      program, even if it was configured already. To explain why this is
      problematic:
      
        - The programs we try to configure in this function are those that
          arise from a "build-tool-depends" field of a package.
        - If the program is not in the "unconfigured" state, we would
          unconditionally treat it as a simpleProgram.
          This means that if such a program is builtin but is not a
          simpleProgram, we might fail to configure it properly.
      
      This problem arises when we configure programs more eagerly: when, in
      the past, we might have gone looking up an unconfigured program and
      successfully configured it, now we might find the program is already
      configured.
      
      One example in which this would cause an issue is when we have
      
         build-tool-depends: hsc2hs
      
      If we end up re-configuring hsc2hs in configureRequiredProgram, we would
      treat it as a simple program, which would cause us to be unable to
      determine its version.
      c6a26d48
    • sheaf's avatar
      cabal-install configureCompiler: configure progdb · 8bdda9c0
      sheaf authored
      We should configure unconfigured programs before serialising them
      (using the Binary ProgramDb instance) in
      Distribution.Client.ProjectPlanning.configureCompiler, as otherwise
      we can accidentally discard information.
      
      This isn't currently a live bug, because in practice we end up
      re-running configuration steps when interfacing with the Cabal library.
      However, in the bright future in which we avoid re-configuring things
      when building a Cabal package that we already determined when invoking
      cabal-install, this starts causing problems.
      8bdda9c0
    • malteneuss's avatar
      Merge pull request #10099 from cabalism/grammar/explicit-project-packages · 355067d0
      malteneuss authored
      Change packages default to empty
      355067d0
    • mergify[bot]'s avatar
      Merge pull request #9968 from sheaf/testing-pkgdb · fc5893dc
      mergify[bot] authored
      testsuite: Pass pkgdb of store used for intree Cabal
      fc5893dc
    • Rodrigo Mesquita's avatar
      25ac7210
    • mergify[bot]'s avatar
      Merge pull request #10105 from alt-romes/wip/romes/ghc24926 · 50d5e31d
      mergify[bot] authored
      Fix recomp bug by invalidating cache on build exception
      50d5e31d
    • Rodrigo Mesquita's avatar
      Fix recomp bug by invalidating cache on build exception · a9f2c3b2
      Rodrigo Mesquita authored
      Be sure to invalidate the cache if building throws an exception!
      If not, we'll abort execution with a stale recompilation cache.
      See ghc#24926 for an example of how this can go wrong.
      a9f2c3b2
  2. Jun 14, 2024
  3. Jun 13, 2024
  4. Jun 12, 2024
    • Mango The Fourth's avatar
      add the applicable new (version 9.10) GHC flags to normaliseGhcArgs (#10014) · be10be83
      Mango The Fourth authored
      * add the applicable new (versions 9.2 - 9.10) GHC flags to normaliseGhcArgs
      
      Actionable flags are:
      - fdiagnostics-as-json (changes the format GHC outputs its diagnostics)
      - fprint-error-index-lists (changes the way GHC displays compile time)
      - fbreak-points (enables/disables break-points in GHCi)
      - dipe-stats (dumps information about which info tables have IPE
        information)
      - ffamily-application-cache (only changes the speed of the compiler)
      - fprint-redundant-promotion-ticks
      - show-error-context
      - unoptimized-core-for-interpreter (only applies to GHCi)
      
      * [chore] correct the flag names and add a FUTUREWORK
      be10be83
  5. Jun 10, 2024
  6. Jun 09, 2024
  7. Jun 07, 2024
  8. Jun 02, 2024
    • mergify[bot]'s avatar
      Merge pull request #10056 from wismill/install/fix-program-suffix · dda541ce
      mergify[bot] authored
      Fix --program-suffix resulting in invalid symlink
      dda541ce
    • Pierre Le Marre's avatar
      Fix --program-{prefix,suffix} resulting in invalid installation · 85934742
      Pierre Le Marre authored
      Currently the options `--program-{prefix,suffix}` for cabal install
      affects the name of the file in the install directory *and* the
      executable name in the store. The installation fails:
      
      - If using `--install-method=symlink`, the *target* of the symlink is
        not affected by the affix options and it results in an invalid symlink.
      - If using `--install-method=copy`, the copy fails because the source
        is not found.
      
      Another issue is that it affects the computation of the hash of the
      build directory in the store, resulting in needless rebuild when using
      successively different affix options.
      
      Fixed by making the name of the executable in the store canonical, i.e.
      always ignoring the program affix options.
      
      Added a test for all the combinations of `--install-method` and program
      affixes options.
      85934742
    • mergify[bot]'s avatar
      Merge pull request #10017 from mpickering/wip/multi-fixes · 6f1329b8
      mergify[bot] authored
      Two fixes to multi repl command
      6f1329b8
    • Matthew Pickering's avatar
      Fix rendering of `-j` option in multi-repl · c3708d21
      Matthew Pickering authored
      Before this was rendered as..
      
      ```
      /run/current-system/sw/bin/ghc --interactive -package-env - -j 'NumJobs (Just 8)' ...
      ```
      
      Due to this place not being updated when support for semaphores was
      added.
      c3708d21
    • Matthew Pickering's avatar
      Add extra ghc options to multi-repl file · 539cb7bc
      Matthew Pickering authored
      These options are configured into the program by Cabal, so we also need
      to extract these and put them into the mutli-file.
      
      Fixes #10015
      539cb7bc
  9. May 30, 2024
    • mergify[bot]'s avatar
      Merge pull request #9177 from FinleyMcIlwaine/wip/haddock-avoid-recomp · ab4c1370
      mergify[bot] authored
      Haddock recompilation avoidance
      ab4c1370
    • Rodrigo Mesquita's avatar
      haddock: Copy interface files to tmp dir · a1e14a7d
      Rodrigo Mesquita authored
      In the last commits we started re-using GHC's interface files and
      objects in haddock in order to avoid recompilation.
      
      However, if haddock is run with different flags than GHC (say, for example,
      `haddock-options: -DSomethingCustom`), it will recompile the interfaces
      and objects.
      
      This commit introduces a guardrail to the process of re-using GHC's
      compilation files: instead of running haddock directly on the
      directories where GHC placed its output, copy the directory contents to
      a temporary directory and point haddock to the objects and interfaces
      there. Even if recompilation is triggered by haddock, the objects
      produced by GHC will be left untouched.
      a1e14a7d
    • Rodrigo Mesquita's avatar
      haddock: Pass --no-tmp-comp-dir by default · 68fcd33d
      Rodrigo Mesquita authored
      With "Hi Haddock", we want to re-use GHC's compilation output (in
      particular, the generated interface files) to generate documentation
      from. However, haddock by default will use a temporary location to build
      sources, and will therefore fail to find the interface files produced by
      GHC.
      
      To avoid recompilation, we need to instruct Cabal to pass
      --no-tmp-comp-dir to Haddock so as to not use a temporary directory and
      thus re-use existing interface files.
      68fcd33d
    • Rodrigo Mesquita's avatar
      Cabal: Don't pass -D__HADDOCK_VERSION__ to haddock · 144383e8
      Rodrigo Mesquita authored
      We no longer define the `__HADDOCK_VERSION__` macro when invoking GHC
      through Haddock, since doing so essentially guarantees recompilation
      during documentation generation.
      
      We audited all uses of `__HADDOCK_VERSION__` in hackage, ensuring there
      was a reasonable path forward to migrate away from using
      `__HADDOCK_VERSION__` for each, while generating the same documentation
      as it did before.
      
      If you are a user of `__HADDOCK_VERSION__`, please take a look at the
      discussion in https://github.com/haskell/cabal/pull/9177 and reach out
      to us if your use case is not covered.
      
      Reverts the version-cpp flag introduced in the previous commit to avoid
      a workaround. Instead, we get rid of the problem (`__HADDOCK_VERSION__`) at its root.
      
      See the discussion in #9177
      144383e8
    • Finley McIlwaine's avatar
      Do not use tmp dirs for Haddock, add --haddock-version-cpp, and more · 80f0a652
      Finley McIlwaine authored
      Haddock no longer writes compilation files by default, so we do not need to pass
      tmp dirs for `-hidir`, `-stubdir`, and `-odir` via `--optghc`. Indeed, we do not
      *want* to do so, since it results in recompilation for every invocation of
      Haddock via Cabal. This commit stops this from happening for haddock versions >=
      2.28 (when Hi Haddock was introduced).
      
      This commit also stops the default definition of the `__HADDOCK_VERSION__` macro
      when invoking GHC through haddock. Since a very limited set of users may still
      depend on this macro, we introduce the `--haddock-version-cpp` flag and
      `haddock-version-cpp:` cabal.project field, which enable the definition of
      the `__HADDOCK_VERSION__` macro when invoking GHC through Haddock. This will
      almost guarantee recompilation during documentation generation due to the macro
      definition.
      
      This commit also renames the `--haddock-lib` flag to `--haddock-resources-dir`
      (and `haddock-lib:` cabal.project field to `haddock-resources-dir:`), and adds
      this flag to the users guide since it was missing an entry. This also allows us
      to add this field to `cabal-install:test:integration-tests2`, since it is no
      longer ambiguous with the `--lib` flag.
      
      This commit also causes `documentation: true` or `--enable-documentation` to
      imply `-haddock` for GHC.
      
      Also, since Haddock >= 2.29 is renaming `--lib` to `--resources-dir`, this
      commit switches the flag provided to Haddock using a backwards compatible
      condition based on the Haddock version.
      
      Adds a changelog entry.
      80f0a652
    • mergify[bot]'s avatar
      Merge pull request #10055 from wismill/semaphore/verbosity · f323d296
      mergify[bot] authored
      fix: Make newSemaphoreJobControl respect verbosity
      f323d296
  10. May 29, 2024
  11. May 28, 2024
  12. May 26, 2024
  13. May 24, 2024
  14. May 23, 2024
Loading