-
Notifications
You must be signed in to change notification settings - Fork 691
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
source-repository-package
clone not disabled by --offline
flag or active-repositories
#9641
Comments
Just to be sure, it would make sense to test this with a cabal master branch nightly binary (or a local build from the master branch). |
I wouldn't expect |
@Mikolaj , yes good idea, here is a test from a recent build of
|
i.m.o. if the I'd prefer it works like building the example twice:
Ultimately what I'd like is for Nix to provide the |
More specifically, I think you mean:
We have this problem in |
Referring to the remote repository? If so, this error will occur in the Nix build:
I want to prevent Cabal in the Nix build from invoking Git. I guess this also applies to Git local repository on disk. Thanks for the |
haskell-flake just uses the You should be able to reproduce this issue using |
Does The To reproduce the issue with the The issue of Cabal ignoring the However, isn't it sufficient to show the issue exists with just plain Cabal and I will try to implement this fix, starting here:
|
cabal/cabal-install/src/Distribution/Client/ProjectConfig.hs Lines 1371 to 1379 in a703871
TODO for me:
|
haskell#9641 warning when offline mode skips `source-repository-package`s i.e. ``` Warning: --offline was specified, skipping sync of repositories: Warning: https://github.com/haskell/text.git ```
This makes the I have not confirmed this will fix my original issue with Nix. I believe it will; Nix should provide the remote resource, Nix will apply the |
haskell#9641 warning when offline mode skips `source-repository-package`s i.e. ``` Warning: --offline was specified, skipping sync of repositories: Warning: https://github.com/haskell/text.git ```
haskell#9641 warning when offline mode skips `source-repository-package`s i.e. ``` Warning: --offline was specified, skipping sync of repositories: Warning: https://github.com/haskell/text.git ```
#9641 warning when offline mode skips `source-repository-package`s i.e. ``` Warning: --offline was specified, skipping sync of repositories: Warning: https://github.com/haskell/text.git ``` (cherry picked from commit df8f0c5)
#9641 warning when offline mode skips `source-repository-package`s i.e. ``` Warning: --offline was specified, skipping sync of repositories: Warning: https://github.com/haskell/text.git ``` (cherry picked from commit df8f0c5)
Describe the bug
Similar to #5346
cabal.project
source-repository-package
is cloned from GitHub, regardless of the--offline
flag oractive-repositories
: https://cabal.readthedocs.io/en/stable/cabal-project.html#cfg-field-active-repositoriesTo Reproduce
example project: https://github.com/peterbecich/cabal2nix-project-issue
This example clones the
haskell/text
repository as asource-repository-package
.The
nix
files are irrelevant to this issue.git clone https://github.com/peterbecich/cabal2nix-project-issue.git
cabal build --enable-tests --offline
Cabal will clone the
source-repository-package
:I have tested
and
To re-test,
Expected behavior
The
--offline
flag and/oractive-repositories
work perfectly to block access to Hackage. Can the same be done forsource-repository-package
?System information
cabal
3.10.2.1ghc
9.6.4Additional context
This may help to solve a different issue with Nix. Example Nix build from a different repository:
In this Nix build, Cabal is attempting to clone the
source-repository-package
but Nix is correctly not providing Git.One way to solve this may be to have Nix invoke Cabal with the
--offline
flag.I think that may go somewhere in
make-package-set.nix
: https://github.com/NixOS/nixpkgs/blob/46d10fdfe87d34e1641d627c31dbedd719024c91/pkgs/development/haskell-modules/make-package-set.nix#L4The text was updated successfully, but these errors were encountered: