Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal.git. Pull mirroring updated .
  1. Jan 19, 2025
  2. Jan 18, 2025
  3. Jan 17, 2025
    • mergify[bot]'s avatar
      Merge pull request #10287 from haskell/wip/t10283 · 5ac2f87a
      mergify[bot] authored
      Only munge internal dependencies when printing when there is no explicit syntax
      5ac2f87a
    • Matthew Pickering's avatar
      Only munge internal dependencies when printing when there is no explicit syntax · 4019d172
      Matthew Pickering authored
      * In `postProcessInternalDeps` the shadowing logic which existed prior
        to cabal format 3.4 is implemented in a post processing step.
      
        The algorithm there replaces any references to internal sublibraries
        with an explicit qualifier. For example if you write..
      
        ```
        library
          build-depends: foo
      
        library foo
          ...
        ```
      
        this is reinterpreted as
      
        ```
        library
          build-depends: mylib:foo
      
        library foo
          ...
        ```
      
      * In `preProcessInternalDeps` the inverse transformation takes place,
        the goal is to replace `mylib:foo` with just `foo`.
      
      * Things go wrong if you are using version 3.0 for your cabal file
        because
        - In 3.0 the qualifier syntax is introduced so you can be expliciit
          about sublibrary dependencies
        - The shadowing semantics of non-qualified dependencies still exists.
      
        So the situation is that the user is explicit about the sublibrary
      
        ```
        library
      
        library qux
          build-depends: mylib:{mylib, foo}
      
        library foo
        ```
      
        1. Post-process leaves this alone, the user is already explicit about
           depending on a sublibrary.
        2. Pre-processing then rewrites `mylib:{mylib, foo}` into two
           dependencies, `mylib` and `foo` (no qualifier).
        3. When parsed these are two separate dependencies rather than treated
           as one dependency, roundtrip test fails.
      
      Solution: Only perform the reverse transformation when the cabal library
      version is <= 3.0 and doesn't support the explicit syntax.
      
      Now what happens in these two situations:
      
      1. ```
         library
           build-depends: foo
      
         library foo
           ...
         ```
      
        this is reinterpreted as
      
        ```
        library
          build-depends: mylib:foo
      
        library foo
          ...
        ```
      
        then printed and parsed exactly the same way.
      
      2. Explicit syntax is parsed and printed without being munged (when
         supported)
      
      Note: Mixins only supported sublibrary qualifiers from 3.4 whilst
      dependencies supported this from 3.0, hence the lack of guard on the
      mixins case.
      
      Fixes #10283
      4019d172
    • Peter Becich's avatar
      Merge pull request #10714 from peterbecich/fix-cabal-build-depends-formatting-inconsistency · 54b48386
      Peter Becich authored
      make formatting of `build-depends` consistent
      54b48386
    • Peter Becich's avatar
    • Peter Becich's avatar
      make formatting of `build-depends` consistent · 7d791b9d
      Peter Becich authored
      `*.cabal` files in this project presently have a mix of formatting of `build-depends`.
      Make them all consistent with:
      https://cabal.readthedocs.io/en/3.4/cabal-package.html
      
      No changes to any dependencies.
      7d791b9d
  4. Jan 16, 2025
  5. Jan 15, 2025
  6. Jan 14, 2025
    • Phil de Joux's avatar
      Add a cabal target command · f1fbee2c
      Phil de Joux authored
      
      - Avoid list in the help
      - Use establishProjectBaseContext
      - Remove withContextAndSelectors
      - Use rebuildInstallPlan and resolveTargets
      - Extract targetForms
      - Satisfy hlint
      - Remove unnecessary do
      - Use safeHead
      - Call printPlanTargetForms for everything
      - Remove planTargetForms
      - Rework command description
      - Remove script as a possible TARGET form
      - Section help into; intro, targetFroms and ctypes
      - Use pretty printing for examples
      - Short form and long form
      - Add a changelog entry
      - Need nixStyleOptions for cabal-testsuite
        - unrecognized 'v2-target' option `-vverbose +markoutput +nowrap'
        - unrecognized 'v2-target' option `--builddir'
        - unrecognized 'v2-target' option `-j1'
      - Use notice so target forms are marked output
      - Add tests of target all, implicit and explicit
      - Add tests of all:exes and all:tests
      - Add test of all:benches
      - Add tests with --enable-tests and --enable-benchmarks
      - Warn that package targets display libs and exes
      - Add package target tests
      - Add path target tests
      - Add component target tests
      - Add c package with only a library
      - Add tests for missing ctypes
      - Exclude new-target from other commands
      - Move target command to configuration group
      - Add target command docs
      - Add cabal target docs
      - A significant change
      - Drop cleans from tests
      - Use noticeDoc to preserve indent
      - Satisfy fourmolu
      - Show the number of matches found matching query
      - Change synopsis of command, target verb
      - Remove disclosed, use show, WARN and NOTE
      - Typo command singular
      - Bring the command docs inline with --help docs
      - Remove disclosing from changelog
      - Only by default, not *only*.
      
      Co-Authored-By: Brandon S. Allbery's avatarbrandon s allbery kf8nh <allbery.b@gmail.com>
      f1fbee2c
  7. Jan 13, 2025
  8. Jan 12, 2025
  9. Jan 11, 2025
  10. Jan 09, 2025
Loading