Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Sep 01, 2024
  2. Aug 29, 2024
    • 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
  3. Jul 18, 2024
  4. Jun 28, 2024
    • Marcin Szamotulski's avatar
      haddock-project: support for sublibraries · ac527adf
      Marcin Szamotulski authored
      This commit makes haddock-project handle sublibraries.
      
      The commit changes how `cabal haddock` works, changing the layout
      in the `dist-newstyle` folder.  With this change `haddock` subcommand
      will install `package:sublib` component in a directory `package-sublib`
      under `l/sublib/doc/html/`.
      ac527adf
  5. Apr 19, 2024
    • Matthew Pickering's avatar
      testsuite: Refactor withShorterPathForNewBuildStore · 2a2d0b30
      Matthew Pickering authored and Rodrigo Mesquita's avatar Rodrigo Mesquita committed
      This makes `withShorterPathForNewBuildStore` fit more nicely into the
      rest of the testing infrastructure.
      
      * Move `withShorterPathForNewBuildStore` to `TestM` monad
      * Move responsibility for passing `--store-dir` to `cabalGArgs` function
      * Move `findDependencyInStore` into `TestM`, and remove requirement to
        pass path to store directory.
      * Introduce `testStoreDir` function which returns the store location
        (and honours `withShorterPathForNewBuildStore`)
      * Migrate tests which use `withShorterPathForNewBuildStore`.
      2a2d0b30
  6. Jul 05, 2023
    • Marcin Szamotulski's avatar
      Removed some haddock-project options · 1b89c1bf
      Marcin Szamotulski authored
      This patch makes `haddock-project` use `--local` option by default.
      Since its the default, it is removed. Also `--gen-index`,
      `--gen-contents`, `--hyperlinked-source` and `--quickjump` are removed
      since they are always turned on.
      
      Added a haddock-project test.
      1b89c1bf
  7. Jun 02, 2023
  8. Feb 23, 2023
  9. Sep 24, 2022
  10. Jun 25, 2022
  11. Mar 04, 2022
  12. Sep 13, 2020
  13. Jun 24, 2020
    • Luke Lau's avatar
      Fix ghci being launched before other sources were built · e3d26087
      Luke Lau authored
      This looks like an accident from a6e427ac
      It causes cases like this to fail:
      
      $ cat foo.c
      int foo() { return 42; }
      $ cat Lib.hs
      module Lib where
      
      foreign import ccall "foo" foo :: Int
      
      bar = foo
      $ cat cabal-csrc-repl.cabal
      cabal-version:      2.4
      name:               cabal-csrc-repl
      version:            0.1.0.0
      library
          exposed-modules:  Lib
          build-depends:    base ^>=4.14.0.0
          C-sources:        foo.c
          default-language: Haskell2010
      $ cabal v2-repl
      Resolving dependencies...
      Build profile: -w ghc-8.10.1 -O1
      In order, the following will be built (use -v for more details):
       - cabal-csrc-repl-0.1.0.0 (lib) (first run)
      Configuring library for cabal-csrc-repl-0.1.0.0..
      Preprocessing library for cabal-csrc-repl-0.1.0.0..
      GHCi, version 8.10.1: https://www.haskell.org/ghc/  :? for help
      [1 of 1] Compiling Lib              ( Lib.hs, interpreted )
      Ok, one module loaded.
      *Lib> foo
      ghc: ^^ Could not load '_foo', dependency unresolved. See top entry above.
      e3d26087
  14. Apr 13, 2020
  15. Apr 04, 2020
  16. Apr 03, 2020
    • Oleg Grenrus's avatar
      setupAndCabalTest uses cabal act-as-setup for cabal part · ab355361
      Oleg Grenrus authored
      The cabal command interface will drift more and more from
      ./Setup interface. This is first step: don't assume
      they are the same.
      
      This removes need to "patch" setup commands to work with cabal:
      the `act-as-setup` SHOULD behave as (simple) ./Setup
      
      There were few setupAndCabalTests which weren't `build-type: Simple`.
      For those I made a separate `cabal.test.hs`.
      
      Also added a OutputNormalizer for global tmp directory.
      `v2-build` sdists `build-type: Custom` packages to get the list of files
      to watch. I guess it's ok to have that functionality,
      yet it could be eventually removed, as `v2-sdist`
      does not invoke `./Setup.hs` script.
      ab355361
  17. Nov 03, 2019
    • Edward Z. Yang's avatar
      Compute correct install directories for instantiated Backpack components (#6317) · 129775a7
      Edward Z. Yang authored
      
      * Restructure Includes3 tests so that I can also test Hackage case.
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@mit.edu>
      
      * Compute correct install directories for instantiated Backpack components
      
      Previously, we would compute elabInstallDirs once when configuring a
      component, and then reuse the exactly same install directories for
      every instantiation of the package.  But this is wrong, since we're
      installing the header/object files for each instantiation to a different
      directory.  We refactor install directory computation into a helper
      function and then call it again at instantiation time to refresh
      the install directories.
      
      For some reason, this bug ONLY manifests for packages installed from
      Hackage; it seems install dirs are not respected for inplace packages.
      
      Fixes #6005
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@mit.edu>
      
      * Test fix
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@mit.edu>
      
      * Copy backpack version-guard from other backpack testcases
      129775a7
  18. Oct 01, 2019
  19. Dec 17, 2018
  20. Jan 16, 2018
    • Herbert Valerio Riedel's avatar
      Implement preliminary support for new forward-compat scheme · 538f1269
      Herbert Valerio Riedel authored and Oleg Grenrus's avatar Oleg Grenrus committed
      This provides a provisional (i.e. hacky) retrofitted implementation of
      the forward-compat scheme described in #4899 for the cabal-2.2 branch
      
      This hack works by constructing a dummy package description in case
      the package description fails to be parsed via the standard parser,
      and we detect a new-style cabal-spec declaration.
      538f1269
  21. Jul 21, 2017
  22. Jul 18, 2017
  23. Jul 16, 2017
  24. Mar 17, 2017
  25. Feb 19, 2017
  26. Nov 27, 2016
  27. Nov 18, 2016
  28. Oct 31, 2016
Loading