-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directly call in-library functions to build packages #9871
base: master
Are you sure you want to change the base?
Commits on Oct 25, 2024
-
PackageDescription warnings for normal verbosity
This commit makes it so that cabal-install emits PackageDescription parser warnings at normal verbosity or above. Previously, we used to emit warnings at verbosity >= verbose, but now that we are going through in-library methods this meant we could skip ever emitting some warnings, which is not desirable.
Configuration menu - View commit details
-
Copy full SHA for db779f3 - Browse repository at this point
Copy the full SHA db779f3View commit details
Commits on Oct 31, 2024
-
cabal-install: call Cabal in-library
This commit modifies the SetupWrapper mechanism, adding a new way of building a package: directly calling Cabal library functions (e.g. 'build', 'configure' etc). This currently requires a bit of GADT trickery to accomodate the fact that configure returns a LocalBuildInfo which must then be passed to subsequent phases, while with the old Setup interface everything returns IO () and communication is done through the filesystem (the local build info file). To handle 'build-type: Hooks', this commit introduces the hooks-exe package, which contains: - the hooks-exe library, used to compile a set of SetupHooks into an external executable, - the hooks-cli library, which is used by cabal-install to communicate with an external hooks executable. This package depends on the new `CommunicationHandle` functionality from haskell/process#308.
Configuration menu - View commit details
-
Copy full SHA for 5e699cd - Browse repository at this point
Copy the full SHA 5e699cdView commit details -
hooks: Implicitly depend on hooks-exe
The `hooks-exe` package enables `SetupHooks` values to be converted into a `Setup.hs` executable which can be executed independently of Cabal. The `Setup.hs` executable wrapping `SetupHooks` is quite important to preserve the interface used by other tools when packages migrate to `Hooks` from `Custom`. Even though `hooks-exe` is an internal dependency required by the `Setup.hs` wrapper around `SetupHooks`, it is a dependency nonetheless. Given the internal nature of `hooks-exe`, we don't want to impose on our users the obligation to add a dependency on `hooks-exe` in their setup-depends field. Instead, we want `hooks-exe` to be implicitly added to the setup dependencies. This commit does that exactly.
Configuration menu - View commit details
-
Copy full SHA for 4e79d8d - Browse repository at this point
Copy the full SHA 4e79d8dView commit details -
Update bootstrap plans for hooks-exe
This commit updates the bootstrap plans to account for the new local hooks-exe package, which cabal-install depends on.
Configuration menu - View commit details
-
Copy full SHA for e577d46 - Browse repository at this point
Copy the full SHA e577d46View commit details -
cabal-install in-library Cabal: test changes
This commit contains testsuite changes to account for the change in how cabal-install calls Cabal. The most common change is that we emit warnings at a slightly different point during compilation.
Configuration menu - View commit details
-
Copy full SHA for 8848700 - Browse repository at this point
Copy the full SHA 8848700View commit details -
This SetupMethod is no longer used; it is replaced by the InLibrary SetupMethod which directly calls Cabal library functions instead of going through defaultMain.
Configuration menu - View commit details
-
Copy full SHA for 897dca9 - Browse repository at this point
Copy the full SHA 897dca9View commit details -
Small refactoring of SetupWrapper
This moves some functions to the top-level and threads through the required arguments. This helps to separate concerns a bit more, as opposed to having all functions defined in one big blob.
Configuration menu - View commit details
-
Copy full SHA for 8e4fc80 - Browse repository at this point
Copy the full SHA 8e4fc80View commit details
Commits on Nov 5, 2024
-
Fix haddock compilation with in-library calls
`reusingGHCCompilationArtifacts` assumed the existence of a build folder where objects were written (even if empty), but with InLibrary calls this is no longer necessarily true. Previously, the build folder ended up always existing because the call of `configure` through `Setup` created the folder. However, now that we may call Cabal the library directly, the existence of this directory is no longer guaranteed. Easy fix: don't try to copy the build folder if it doesn't exist yet.
Configuration menu - View commit details
-
Copy full SHA for 8a51434 - Browse repository at this point
Copy the full SHA 8a51434View commit details