Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Jun 28, 2024
  2. May 30, 2024
    • 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
  3. May 18, 2023
  4. May 17, 2021
  5. May 04, 2021
    • Emily Pillmore's avatar
      Rewrite `cabal init` command · 10687555
      Emily Pillmore authored
      * Restructures the `cabal init` command to fix historical
        issues. All flags are preserved.
        * Codebases for interactive and non-interactive flags
          are disentangled.
        * Data structures now exploit relevant stanza structure
          and formatters only care about stanza data
        * Heuristics and prompts have a pure and impure implementation.
      
      * Sets default behavior to be `--interactive` as opposed to
        `--non-interactive`.
      
      * Rewrites tests to achieve 98% coverage
        * Golden files now test every stanza individually
        * Every flag is covered by a unit test
        * Interactive, simple, and non-interactive workflows are
          covered.
      10687555
  6. Jul 14, 2020
  7. May 07, 2020
  8. Apr 21, 2020
  9. Apr 13, 2020
    • Matt Renaud's avatar
      Add cabal init golden test exercise --libandexe behaviour. · 17733f64
      Matt Renaud authored
      The key item captured in this test is that when 'cabal init --libandexe' is run
      in an empty directory it will result in a dependency on the library from the
      executable in the form of 'build-depends = <package-name>' but with no version
      constraints since they are implied by the version of the current package.
      17733f64
  10. Apr 10, 2020
  11. Jun 19, 2011
  12. May 05, 2011
    • Joel Stanley's avatar
      intrapackage-deps-and-per-component-preprocessing · 2e348126
      Joel Stanley authored
      This patch adds intrapackage dependency resolution so that components
      (libraries, exes, test suites) are build in the correct order.  This mean it's
      now possible to have, e.g., executables that depend on other executables defined
      in the same package description: the build-tools namespace has been extended
      accordingly.
        
      Related to this change is the refactoring of the do-it-all preprocessSources
      function, formerly invoked by initialBuildSteps, into a a function
      preprocessComponent that is invoked when a component is being built.  This lets
      us use executables defined in a package to be used as a custom preprocessor when
      building other components.
        
      Finally, a number of functions now operate on values of the sum type
      PackageDescription.Component rather than specifically operating on Library or
      Executable and so forth.
      2e348126
  13. Jan 14, 2011
  14. Jan 13, 2011
  15. Jan 10, 2011
    • ttuegel's avatar
      Tracking enabled/disabled TestSuites in PackageDescription. · f0a2d5e3
      ttuegel authored
      This patch adds the 'testEnabled' field to TestSuite. It's 
      undesirable to track build status information in the static package 
      description, but there is no better solution at this time. This 
      patch has the side-effect of fixing several TODOs in 
      Distribution.Simple.Configure.
      f0a2d5e3
  16. Oct 25, 2010
  17. Oct 16, 2010
  18. Jun 29, 2010
  19. Jun 08, 2010
  20. May 26, 2010
    • ttuegel's avatar
      Testsuite for Test stanza parsing · 35c5c46b
      ttuegel authored
      Ticket #215 (Overhaul support for packages' tests). Parse and
      finalize a simple, dummy .cabal file containing a Test stanza.
      Compare with the PackageDescription it which should result
      from parsing.
      35c5c46b
  21. Jun 02, 2010
    • Duncan Coutts's avatar
      Fix QA check on version range syntax to detect use of ()'s · f9a786c0
      Duncan Coutts authored
      The problem was that we do the QA check on using the new version range
      syntax after parsing. The new syntax allows ()'s but previously the
      code threw them away in the parser stage. We now retain them in the
      AST and deal with them appropriately. This now allows the QA check to
      be accurate and detect things like "build-depends: base (>= 4.2)".
      f9a786c0
  22. May 27, 2010
  23. Mar 21, 2010
  24. Mar 09, 2010
  25. Oct 06, 2009
    • Duncan Coutts's avatar
      I was wrong, the test was correct before. · 17c9c033
      Duncan Coutts authored
      rolling back:
      
      Mon Oct  5 17:32:02 BST 2009  Stephen Blackheath <grossly.sensitive.stephen@blacksapphire.com>
        * Fix test case InternalLibrary4 on account of a change in Cabal's behaviour.
      
          M ./tests/PackageTests/BuildDeps/InternalLibrary4/Check.hs -5 +4
      17c9c033
  26. Oct 05, 2009
  27. Sep 20, 2009
  28. Sep 17, 2009
  29. Jun 08, 2009
  30. Jun 01, 2009
  31. May 26, 2009
  32. Dec 10, 2008
  33. Dec 04, 2008
Loading