This project is mirrored from https://github.com/haskell/Cabal.
Pull mirroring updated .
- Jan 29, 2024
-
-
Rodrigo Mesquita authored
1. Refactors the duplicated `buildExtraSources` function from `gbuild` and `buildOrReplLib` into a standalone monadic computation in the context of building a component. This refactor allows us to share the code for building an extra source amongst the two functions. 2. Creates a new module Distribution.Simple.GHC.Build.Modules which, in the same spirit as ...GHC.Build.ExtraModules, defines an action which builds all the Haskell modules of the component being built. This function clarifies and re-implements the logic of building Haskell modules in the different possible ways, while accounting for Template Haskell special "way requirements", which was previously duplicated in a non-obvious manner in gbuild and buildOrReplLib. The Note [Building Haskell modules accounting for TH] in that module explains the big picture, and the implementation is re-done in light of it. 3. Re-work the linker invocations, focusing on preserving existing behaviour before simplifying or fixing bugs any further. Fixes #9389.
-
Rodrigo Mesquita authored
-
mergify[bot] authored
Don't build unnecessary targets of legacy-fallback deps.
-
Rodrigo Mesquita authored
The refactor in f70fc980 solved an inconsistency in `buildAndInstallUnpackedPackage`. Namely, before the refactor, we didn't pass `hsSetupBuildArgs` to the build invocations, and afterwards we did. The result is that build targets of (legacy) package `B`, that a package `A` depends on, are now passed to the ./Setup build invocation of package `B` (e.g. `./Setup build lib:openapi3` rather than just `./Setup build`). This means we no longer /build always all targets of a legacy-package/ (for example, the lib, the testsuites and the executables). Instead only the required target (just the lib) will be built. However, despite now passing the build args to `./Setup build`, we weren't passing the same arguments to the `./Setup copy` invocation. Therefore, `./Setup copy` would also try to copy targets of the package that weren't built, resulting in a failure. This fixes that failure by correctly passing the build targets to the `./Setup copy` invocation, just like we do for the `./Setup build` one. Fixes #9640
-
Andrea Bedini authored
This change removes support for building sub-component targets in cabal-install, since no versions of Cabal support this feature. The test RunMainBad is also dropped because without the concept of a file target, RunMainBad is the same test as ScriptBad.
-
mergify[bot] authored
Cabal-syntax: Drop dependencies on unix and Win32
-
Ben Gamari authored
Neither of these dependencies appear to be needed.
-
- Jan 26, 2024
-
-
mergify[bot] authored
Add solver Hackage benchmarks to GitHub Actions (fixes #9495)
-
kristenk authored
-
- Jan 25, 2024
-
-
mergify[bot] authored
Ignore `IntegrationTests2/config/default-config`
-
Tom Smeding authored
* Ignore invalid Unicode in pkg-config descriptions Previously, if any of the pkg-config packages on the system had invalid Unicode in their description fields (like the Intel vpl package has at the time of writing, 2024-01-11, see #9608), cabal would crash because it tried to interpret the entire `pkg-config --list-all` output as Unicode. This change, as suggested by gbaz in https://github.com/haskell/cabal/issues/9608#issuecomment-1886120831 switches to using a lazy ByteString for reading in the output, splitting on the first space in byte land, and then parsing only the package _name_ to a String. For further future-proofing, package names that don't parse as valid Unicode don't crash Cabal, but are instead ignored. * Add changelog entry * cabal-install-solver: Add bounds on 'text' * No literal ASCII values, use 'ord' * Address review comments re invalid unicode from pkg-config * Add test for invalid unicode from pkg-config * Compatibility with text-1.2.5.0 * Align imports * Handle different exception type * Use only POSIX shell syntax * Add invalid-input handler in pkg-config shim This is to appease shellcheck * Actually implement all required stuff in the pkg-config shim * Less exception dance * Fix shebang lines MacOS doesn't have /usr/bin/sh, and /bin/sh is the standard (for a POSIX shell) anyway * Don't expect a particular representation of invalid characters --------- Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
-
- Jan 23, 2024
-
-
Ben Gamari authored
Relax `containers` upper bound in `Cabal-syntax`
-
- Jan 22, 2024
-
-
Phil de Joux authored
-
mergify[bot] authored
Add test cases that reproduce sdist --project-file.
-
f-a authored
-
mergify[bot] authored
Solver Hackage benchmark: Explicitly initialize cabal config files
-
- Jan 21, 2024
-
-
mergify[bot] authored
Add cabal-testsuite git ignores for validate dangling files
-
- Jan 20, 2024
-
-
mergify[bot] authored
Add extraLibDirs to runtime lib search paths of library
-
Rodrigo Mesquita authored
Runtime search paths are hard. Here's the current picture to understand why this patch exists: * When linking a shared library, GHC will include in the rpath entries of the shared library all the paths listed in the library dirs section of the installed package info of all packages the shared library depends on. * On darwin, GHC has special logic to inject the library dirs listed in the installed dependent packages info into the rpath section instead of passing the dirs as -rpath flags to the linker. However, only the dirs where used libraries are found are actually injected. The others are ignored. This works around limitations of the darwin loader. * Cabal, in addition, passes directly to the linker (via -optl-Wl,-rpath,...) the library dirs of packages the shared library for the package being built depends on. * In a vanilla cabal installation, this will typically only be the path to the cabal store and the path to the installed GHC's boot libraries store. * When using nix there will a different library dir per installed package. Since these lib dirs are passed directly to the linker as rpaths, we bypass the darwin loader logic and, for very big packages, on darwin, we could end up reaching the load command limit and fail linking. We don't address this situation in this MR. When we specify `extra-lib-dirs` in Cabal, these extra-lib-dirs will be added to the library dirs listed in the installed package info of the library they were specified for. Furthermore, when building a shared library, extra-lib-dirs will be passed as `-L` flags to the linker invocation. However, the same extra-lib-dirs will not be passed as `-rpath` to the linker. The end situation is as follows: 1. The shared library `libA` built for a package `A` will be linked against some libraries `libExtra` found in extra-lib-dirs `extraA`. 2. The RPATH section of `A` will NOT contain `extraA`, because we don't pass -rpath extra-lib-dirs when linking the library, but it will depend on `libExtra`. 3. The installed package info of that package `A` will contain, in the library dirs section, the extra-lib-dirs `extraA` and the path to `libA`. 4. When a package `B` depends on package `A`, it will include in the RPATH section of the shared library `libB` the lib dirs from the installed package info of `A`, i.e. `/path/to/libA` and `extraA`, and depends on `libA` and, transitively, on `libExtra`. The conclusion is: 5. When we load `libB`, we will load `libA`, which is found in `/path/to/libA`, and, transitively, load `libExtra` which is found in `extraA` -- they are both found because both `/path/to/libA` and `extraA` are listed in the RPATH entries. 6. However, if we load `libA` directly we will /NOT/ find `libExtra`, because `extraA` is not included in the RPATH entries. So, ultimately, what this commit fixes, is the failure described in (6), caused by the incorrect behaviour of (2), by specifying `-rpath extra-lib-dirs` when linking the shared library of a package, to include the extra lib dirs in the RPATH entries of that shared library (even though dependents of this library would already get the extra-lib-dirs in their RPATH, the library itself didn't, resulting in cabal#7339 and ghc#19350) Fixes #7339 Fixes ghc#19350
-
Phil de Joux authored
- Move project sdist tests to cabal-testsuite - Add --ignore-project test - Duplicate tests but without cabal.project - Add a cabal.project one folder up - Add a package Z in the root - Rerun --accept with more immediate parent project - Add a readme for the tests - Fix problems with uv package, update expected output - Add U and V modules - Explain what is wrong with cabal.dot-uv.test.hs - Add a note on cabal.no-project.test.hs - Explain what is wrong with cabal.sub-pq.test.hs - Explain what is wrong with cabal.sub-rs.test.hs - Explain what is wrong with cabal.dot-uv.test.hs - Leave a note explaining cabal.no-project.test.hs - Leave a note explaining cabal.project.test.hs - Leave a note explaining cabal.sub-pq.test.hs - Explain what is wrong with cabal.sub-rs.test.hs - Patches for project respecting behaviour - Explain root ignore-project and no-project tests - Add *.v2.test.hs variants exercising v2-sdist - Add v2 patches, test out not using <ROOT>
-
- Jan 19, 2024
-
-
mergify[bot] authored
Include the GHC "Project Unit Id" in the cabal store path
-
Phil de Joux authored
-
Rodrigo Mesquita authored
This complements the previous commit in order to fix #9326
-
Simon Hengel authored
- This allows the use of several **API incompatible builds of the same version of GHC** without corrupting the cabal store. - This relies on the "Project Unit Id" which is available since GHC 9.8.1, older versions of GHC do not benefit from this change. [fixes #8114]
-
- Jan 18, 2024
-
-
mergify[bot] authored
update jinja2 per CVE-2024-22195
-
Brandon S. Allbery authored
-
mergify[bot] authored
Fix extra-prog-path propagation in the codebase.
-
Ondřej Šebek authored
Similarly to CmdExec and CmdTest, get paths to all dependency binaries and add those to PATH. Unlike CmdExec, add just the explicitly required paths.
-
Javier Sagredo authored
Extra prog paths were being handled in many different ways all thorugh the codebase. This PR introduces a unified way to look at them. Aiming for traceability, the addition of extra paths is now traced via `logExtraProgramSearchPath`. All appearances of `modifyProgramSearchPath` are replaced with `appendProgramSearchPath` which traces the added paths. `progInvokePathEnv` was only being set by GHC for some paths to executables in components and only under certain circumstances. Now every `ghcInvocation` sets the extra paths directly into `pkgInvokeEnv`. In particular this fixes PATH issues when running MinGW cabal in PowerShell, as usually for other OSes the system path contains most of the expected directories.
-
mergify[bot] authored
Fix haddock open on windows
-
Javier Sagredo authored
-
Javier Sagredo authored
-
- Jan 17, 2024
-
-
mergify[bot] authored
Sed-replace CRLF files
-
Javier Sagredo authored
-
mergify[bot] authored
Test that the last line `--help` is the name of the config file
-
andreas.abel authored
Ensure that the last line of the help text is the name of the config file. This invariant is used by clients such as the Haskell setup github action. See: https://github.com/haskell-actions/setup/pull/63
-
mergify[bot] authored
Switch from criterion to tasty-bench
-
Bodigrim authored
Makes builds faster by eliminating 10 transitive dependencies: * base-compat-batteries * binary-orphans * cassava * code-page * criterion * criterion-measurement * Glob * js-chart * microstache * Only
-
- Jan 16, 2024
-
-
mergify[bot] authored
Add a format rejections function
-