Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Nov 18, 2023
    • glaubitz's avatar
      Add support for 64-bit SPARC as a separate architecture · 5ae4f2eb
      glaubitz authored
      Previously, sparc64 was defined as an alias for the 32-bit SPARC
      architecture which was true while SPARC mainland was mostly 32
      bits. More recently, 64-bit SPARC has become a port of its own,
      so it needs to be treated as a separate architecture.
      5ae4f2eb
  2. Nov 13, 2023
    • f-a's avatar
      Reimplement `cabal check` (#8427) · 21b858f1
      f-a authored
      * Fix Semigroup target instance
      
      When two target names are the same, `mappend`ing them should not
      error but just pick the first name.
      
      * Add `desugarBuildToolSimple`
      
      * Reimplement cabal check
      
      * Reorder test output
      
      * Fix autogen modules tests .cabal files
      
      * Add a number of tests
      
      * Add test for #7423
      
      i.e. Do not warn on -O2 if under off-by-default package configuration
      flag conditional.
      
      * Add a regression for:
      
          * Add another -WErrr test
              This is to make sure we do *not* report it if it is under
              a user, off-by-default flag.
          * Add test for non manual user flags.
          * Add “absolute path in extra-lib-dirs” test
          * Add if/else test
          * Add “dircheck on abspath” check
          * Add Package version internal test
          * Add PackageVersionsStraddle test
      
      * Add changelog for #8427
      
      * Integrate various reviews
      
      * Integrate Artem’s review
      
      (review) Clarify `combineNames` documentation
      
      By explaining the way it operates (working if the two names are equal
      or one is empty) and renaming the function from `combineName` to
      `combineNames`.
      
      (review) Use guards instead of if/then/else
      
      (review) Match inside argument list
      
      (review) Replace “white” with “allow”
      
      (review) Fix typo in comment
      
      (review) Fix typo in Check module documentation
      
      (review) Harmonise indentation for `data` decls
      
      First field goes in a new line than the data constructor, so we
      have more space.
      
      (review) Rename `Prim` module to `Types`
      
      (review) Add checkPackageFilesGPD
      
      `checkPackageFiles` — which works on PD — was used to perform IO. We
      introduce a function that does the same thing but works on GPD (which
      is more principled).
      
      `checkPackageFiles` cannot just be removed, since it is part of the
      interface of Distribution.PackageDescription.Check. Deprecation can
      be planned once “new check” is up and running.
      
      * Integrate Andreas’ review
      
      (review) Add named section to missing upper bound check
      
      “miss upper bound” checks will now list target type and name (“On
      executable 'myexe', these packages miss upper bounds”) for easier
      fixing by the user.
      
      (review) remove `cabal gen-bounds` suggestion
      
      Reasonable as `cabal gen-bounds` is stricter than `cabal check`, see
      https://github.com/haskell/cabal/pull/8427#issuecomment-1446712486
      
      
      Once `gen-bounds` behaves in line with `check` we can readd the
      suggestion.
      
      (review) Do not warn on shared bounds
      
      When a target which depends on an internal library shares some
      dependencies with the latter, do not warn on upper bounds.
      
      An example is clearer
      
          library
           build-depends: text < 5
          ⁝
           build-depends: myPackage,        ← no warning, internal
                          text,             ← no warning, shared bound
                          monadacme         ← warning!
      
      * Integrate Artem’s review /II
      
      (review) Split Check.hs
      
      Check.hs has been split in multiple file, each une sub 1000 lines:
      
      Check              857 lines
      Check.Common       147 lines
      Check.Conditional  204 lines
      Check.Monad        352 lines
      Check.Paths        387 lines
      Check.Target       765 lines
      Check.Warning      865 lines
      
      Migration guide:
      - Check              GPD/PD checks plus work-tree checks.
      - Check.Common       common types and functions that are
                           *not* part of monadic checking setup.
      - Check.Conditional  checks on CondTree and related matter
                           (variables, duplicate modules).
      - Check.Monad        Backbone of the checks, monadic inter-
                           face and related functions.
      - Check.Paths        Checks on files, directories, globs.
      - Check.Target       Checks on realised targets (libraries,
                           executables, benchmarks, testsuites).
      - Check.Warning      Datatypes and strings for warnings
                           and severities.
      
      (review) remove useless section header
      
      (review) Fix typo
      
      (review) Add warnings documentation (list)
      
      For each warning, we document constructor/brief description
      in the manual.  This might not be much useful as not but it
      will come handy when introducing `--ignore=WARN` and similar
      flags.
      
      * (review Andreas) Clarify CheckExplanation comment
      
      Whoever modifies `CheckExplanation` data constructors needs to be
      aware that the documentation in  doc/cabal-commands.rst  has to be
      updated too.
      
      * Move internal Check modules to `other-modules`
      
      No need to expose Distribution.PackageDescription.Check.*
      to the world. API for checking, for cabal-install and other
      tools, should be in Distribution.PackageDescription.Check.
      
      * Make fourmolu happy
      
      Cabal codebase has now a formatter/style standard (see #8950).
      
      “Ravioli ravioli, give me the formuoli”
      
      * Do not check for OptO in scripts
      
      See #8963 for reason and clarification requests.
      
      * Remove useless PackageId parameter
      
      It is now in the Reader part of CheckM monad.
      
      * Do not check PVP on internal targets
      
      Internal: testsuite, benchmark.
      See #8361.
      
      * Make hlint happy
      
      * Fix #9122
      
      When checking internal version ranges, we need to make sure we
      are not mistaking a libraries with the same name but from different
      packages. See #9132.
      
      * Fix grammar
      
      neither…nor, completing what done in #9162
      
      * Integrate Brandon’s review: grammar
      
      * Remove unnecessary `-fvia-C` check
      
      Brandon’s review/II.
      
      ---------
      
      Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  3. Nov 02, 2023
  4. Sep 08, 2023
  5. Sep 04, 2023
  6. Jul 02, 2023
  7. Jun 22, 2023
    • Oleg Grenrus's avatar
      Make readFields warn about inconsistent indentation. · 3e17cec9
      Oleg Grenrus authored and f-a's avatar f-a committed
      This is affect of using indentOfAtLeast method:
      any indentation greater than current offset is fine.
      
      That behavior is desirable to parsing multiline field contents,
      but it is a bit surprising for fields, which we expect to be aligned.
      
      Such insonsistency seems to be always a mistake, and it's easy to fix once
      a machine points it out.
      3e17cec9
  8. Jun 14, 2023
  9. Jun 10, 2023
  10. May 28, 2023
    • Matthew Pickering's avatar
      Add support for loading multiple components into one repl session · e61b658d
      Matthew Pickering authored and Francesco Gazzetta's avatar Francesco Gazzetta committed
      There are several parts to this patch which are logically distinct but
      work together to support the overal goal of starting a GHCi session with
      multiple packages loaded at once.
      
      1. When a user writes "cabal repl <target>" then if the user is using a
         compiler > ghc-9.4.* then we will attempt to start a multi-session
         which loads the selected targets into one multi-package session of
         GHC.
      1a. The closure property states that in order to load components `p` and `q` into
          the same session that if `p` depends on `z` and `z` depends on `q`
          then `z` must also be loaded into the session.
      1b. Only inplace packages are able to be loaded into a multi session (if a component
          `z` exists then it is already made into an inplace package by
          cabal). Therefore cabal has already engineered that there is source
          code locally available for all packages which we will want to load
          into a session.
      
      2. The solver is unmodified, the solver is given the repl targets and
         creates a build plan as before. After the solver is completed then in
         `setRootTargets` and `pruneInstallPlan` we modify the install plan to
         enforce the closure property and mark which dependencies need to be
         promised.
      
         * Mark the current components as `BuildInPlaceOnly InMemory`, which
           indicates to the compiler that it is to be built in a GHC
           multi-session.
         * Augment the component repl targets to indicate that components
           required by the closure property (in addition to normal targets)
           will be loaded into the repl.
         * Modify the dependency edges in `compLibDependencies` to indicate
           which dependencies are the promised ones (which is precisely
           components which are `BuildInPlaceOnly InMemory` build styles).
           This is the field which is eventually used to populate the
           `--dependency` argument to `./Setup configure`.
      
      Fixes #8491
      e61b658d
  11. May 25, 2023
  12. Apr 26, 2023
  13. Apr 01, 2023
  14. Feb 23, 2023
  15. Feb 19, 2023
  16. Jan 20, 2023
  17. Jan 05, 2023
  18. Dec 04, 2022
    • Jappie Klooster's avatar
      Add upper bound check to all (#8361) · 5d43746f
      Jappie Klooster authored
      * Add check for upper bound on any package
      
      fixes https://github.com/haskell/cabal/issues/8291
      presumably this will make it nag at anyone for forgetting
      to add upper bounds to their packages.
      
      add changelog
      
      (presumably)
      
      wait what?
      
      move toDependencyVersionsMap to utils section
      
      add nicer error message
      
      simplify checking logic, add more comments
      
      only emit missing upper bounds if bigger then one
      
      don't add bound to internal libraries
      
      filter out self from the dependency map
      
      I think this is an external library so it needs an upper bound now?
      
      add test for multilib
      
      fix test suite by ignoring the warning
      
      ... probably not the best approach
      
      change link to pvp instead of parsonsmatt
      
      better wording on missing upper bound error
      
      remove spurious parenthesis
      
      change map creation from monad to list comprehension
      
      use foldmap to get rid of maybe, fix compile error
      
      rewrite from do notation to list comprehension
      
      fix test suite failing
      
      fix compile error
      
      factor out double filter call in a && expression
      
      * set expectation
      
      * Modify test so it gives a list of expected libs
      
      rename public-multilib-3 to all-upper-bound
      the test had little to do with multilib.
      
      * Update comment on ignoring warnigns
      
      * use map instead of if
      
      * Undo map change
      
      add comment on why that doesn't work
      
      * Add description and maintainer fields
      
      * make description longer then synopsis in all-upper-bound.cabal
  19. Oct 09, 2022
  20. Sep 30, 2022
    • Ross Paterson's avatar
      add DeepSubsumption and TypeData language extensions (ghc proposals 511 & 106) (#8493) · f13a1896
      Ross Paterson authored
      
      * add TypeData language extension (ghc proposal 106)
      
      * changelog entry for PR 8493
      
      * add TypeData to cabal.vim
      
      * update MD5 hashes
      
      * Update changelog.d/pr-8493
      
      adjusted wording
      
      Co-authored-by: default avatarArtem Pelenitsyn <a.pelenitsyn@gmail.com>
      
      * add DeepSubsumption as suggesterd by Artem Pelenitsyn
      
      * update MD5sums
      
      Co-authored-by: default avatarArtem Pelenitsyn <a.pelenitsyn@gmail.com>
    • Athas's avatar
      Adopt XDG Base Directory Specification (#7386) · 9f7dc559
      Athas authored
      
      * Move towards using XDG directories.
      
      * Install binaries in $HOME/.local/bin.
      
      * Fix tests.
      
      * Ensure config file is where it should be.
      
      * Require newer directory for XdgState.
      
      * Put world file in XDG_STATE_HOME.
      
      * Oops, forgot to import.
      
      * Remove uses of getCabalDir.
      
      * These all need directory-1.3.7.0 now.
      
      * Oh right, not a builtin anymore.
      
      If this works I will also change the other .json files.
      
      * Try it by hand.
      
      * Haskell is better than JSON.
      
      * Bump directory in all jsons.
      
      * Put directory first.
      
      * Let us assume that getConfigFilePath gets this right.
      
      * Implement backwards compatibility.
      
      * This is now elsewhere.
      
      * We need to create parents as well because ~/.local might not exist.
      
      * Put scripts-build in distinct cache directory.
      
      * Document XDG behaviour.
      
      * Remove help text references to ~/.cabal.
      
      * Remove references to .cabla/bin.
      
      * Backwards compatible install paths.
      
      * Remove more references to ~/.cabal.
      
      * Fix typo.
      
      * Fix ~/.cabal paths making their way into default config.
      
      * Reduce duplication.
      
      * Add changelog entry.
      
      * Also note install dir change.
      
      * It is the cabal-install config file.
      
      * Avoid dependending on cabal-install in Hackage-tests.
      
      * ALso respect CABAL_DIR here.
      
      * Try leaving InstallDirs alone.
      
      * Also need duplication here.
      
      * Add missing newline.
      
      * Fix doc typos.
      
      * Make this a Haddock comment.
      
      * Revision field must not be null.
      
      * Link directories.
      
      * Update doc/config.rst
      
      Co-authored-by: default avatarArtem Pelenitsyn <a.pelenitsyn@gmail.com>
      
      * No need for this.
      
      * We install foreign libraries here now.
      
      * Clarify Nothing case.
      
      * Avoid using ~/.config/cabal in manual.
      
      Co-authored-by: default avatarMikolaj Konarski <mikolaj@well-typed.com>
      Co-authored-by: default avatarArtem Pelenitsyn <a.pelenitsyn@gmail.com>
  21. Aug 31, 2022
    • Alexey Radkov's avatar
      Remove warning on option -threaded when building libraries (#8432) · 1003ed66
      Alexey Radkov authored
      * Remove warning on option -threaded when building libraries
      
      Fixes #8431. Accompanied by option -flink-rts, option -threaded defines
      the flavour of the ghc RTS library the built library will be linked
      against. Note that bare ghc does not warn when option -threaded is used
      for building a library either.
      
      * Cabal no longer warns on -threaded option when building libraries
      
      Note that this commit modifies regression check for issue #774.
      
      * A small changelog was added
  22. Aug 07, 2022
  23. Jul 28, 2022
  24. Jun 15, 2022
  25. May 30, 2022
  26. May 25, 2022
  27. May 24, 2022
  28. May 16, 2022
  29. May 07, 2022
  30. May 05, 2022
    • Francesco Gazzetta's avatar
      Remove "colon specifier is experimental feature" · ee4a92de
      Francesco Gazzetta authored
      Same for "visibility is experimental feature"
      With #7270 fixed, it's time to allow hackage uploads.
      
      PWTExperimental is not used anymore, but for now I'm keeping it in case
      we add other experimental features in the future, so we don't keep
      removing and adding it (pushing CPP on users).
      
      Since it isn't used though there is no way to run
      cabal-testsuite/PackageTests/DuplicateExperimental
      so I'm just removing that test.
      
      Closes #6801
      ee4a92de
  31. May 02, 2022
  32. Apr 29, 2022
  33. Apr 21, 2022
  34. Apr 13, 2022
  35. Apr 06, 2022
  36. Mar 29, 2022
  37. Mar 27, 2022
Loading