Skip to content
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

cabal-install-3.9.0.0 downloads packages even if --dry-run is passed #8706

Closed
phadej opened this issue Jan 27, 2023 · 12 comments
Closed

cabal-install-3.9.0.0 downloads packages even if --dry-run is passed #8706

phadej opened this issue Jan 27, 2023 · 12 comments
Labels
regression on master Regression that is unreleased and needs to be fixed before release status: consider closing type: bug type: regression

Comments

@phadej
Copy link
Collaborator

phadej commented Jan 27, 2023

E.g. on haskell-ci CI:

https://github.com/haskell-CI/haskell-ci/actions/runs/4025432861/jobs/6918641652

% $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
Resolving dependencies...
Downloading  Diff-0.4.1
Downloaded   Diff-0.4.1
Downloading  Glob-0.10.2
Downloaded   Glob-0.10.2
Downloading  HsYAML-0.2.1.1
Downloaded   HsYAML-0.2.1.1
Downloading  OneTuple-0.3.1
Downloaded   OneTuple-0.3.1
Downloading  Only-0.1
Downloaded   Only-0.1
Downloading  QuickCheck-2.14.2
Downloaded   QuickCheck-2.14.2
Downloading  ShellCheck-0.8.0
Downloaded   ShellCheck-0.8.0
Downloading  StateVar-1.2.2
Downloaded   StateVar-1.2.2
Downloading  aeson-2.1.1.0
Downloaded   aeson-2.1.1.0
Downloading  ansi-terminal-0.11.4
Downloaded   ansi-terminal-0.11.4
Downloading  ansi-wl-pprint-0.6.9
Downloaded   ansi-wl-pprint-0.6.9
Downloading  assoc-1.0.2
Downloaded   assoc-1.0.2
Downloading  async-2.2.4
Downloaded   async-2.2.4
Downloading  attoparsec-0.14.4
Downloaded   attoparsec-0.14.4
Downloading  base-compat-0.12.2
Downloaded   base-compat-0.12.2
Downloading  base-compat-batteries-0.12.2
Downloaded   base-compat-batteries-0.12.2
Downloading  base-orphans-0.8.7
Downloaded   base-orphans-0.8.7
Downloading  base16-bytestring-1.0.2.0
Downloaded   base16-bytestring-1.0.2.0
Downloading  bifunctors-5.5.14
Downloaded   bifunctors-5.5.14
Downloading  binary-instances-1.0.3
Downloaded   binary-instances-1.0.3
Downloading  binary-orphans-1.0.3
Downloaded   binary-orphans-1.0.3
Downloading  bitvec-1.1.3.0
Downloaded   bitvec-1.1.3.0
Downloading  bytestring-builder-0.10.8.2.0
Downloaded   bytestring-builder-0.10.8.2.0
Downloading  call-stack-0.4.0
Downloaded   call-stack-0.4.0
Downloading  case-insensitive-1.2.1.0
Downloaded   case-insensitive-1.2.1.0
Downloading  cassava-0.5.3.0
Downloaded   cassava-0.5.3.0
Downloading  charset-0.3.9
Downloaded   charset-0.3.9
Downloading  code-page-0.2.1
Downloaded   code-page-0.2.1
Downloading  colour-2.3.6
Downloaded   colour-2.3.6
Downloading  comonad-5.0.8
Downloaded   comonad-5.0.8
Downloading  contravariant-1.5.5
Downloaded   contravariant-1.5.5
Downloading  criterion-1.6.0.0
Downloaded   criterion-1.6.0.0
Downloading  criterion-measurement-0.2.0.0
Downloaded   criterion-measurement-0.2.0.0
Downloading  cryptohash-sha256-0.11.102.1
Downloaded   cryptohash-sha256-0.11.102.1
Downloading  data-default-class-0.1.2.0
Downloaded   data-default-class-0.1.2.0
Downloading  data-fix-0.3.2
Downloaded   data-fix-0.3.2
Downloading  dense-linear-algebra-0.1.0.0
Downloaded   dense-linear-algebra-0.1.0.0
Downloading  distributive-0.6.2.1
Downloaded   distributive-0.6.2.1
Downloading  dlist-1.0
Downloaded   dlist-1.0
Downloading  generic-lens-lite-0.1
Downloaded   generic-lens-lite-0.1
Downloading  generically-0.1
Downloaded   generically-0.1
Downloading  hashable-1.4.2.0
Downloaded   hashable-1.4.2.0
Downloading  hsc2hs-0.68.8
Downloaded   hsc2hs-0.68.8
Downloading  indexed-traversable-0.1.2
Downloaded   indexed-traversable-0.1.2
Downloading  indexed-traversable-instances-0.1.1.1
Downloaded   indexed-traversable-instances-0.1.1.1
Downloading  ini-0.4.2
Downloaded   ini-0.4.2
Downloading  integer-logarithms-1.0.3.1
Downloaded   integer-logarithms-1.0.3.1
Downloading  js-chart-2.9.4.1
Downloaded   js-chart-2.9.4.1
Downloading  lattices-2.0.3
Downloaded   lattices-2.0.3
Downloading  lukko-0.1.1.3
Downloaded   lukko-0.1.1.3
Downloading  math-functions-0.3.4.2
Downloaded   math-functions-0.3.4.2
Downloading  microstache-1.0.2.3
Downloaded   microstache-1.0.2.3
Downloading  mwc-random-0.15.0.2
Downloaded   mwc-random-0.15.0.2
Downloading  network-uri-2.6.4.2
Downloaded   network-uri-2.6.4.2
Downloading  optparse-applicative-0.17.0.0
Downloaded   optparse-applicative-0.17.0.0
Downloading  parallel-3.2.2.0
Downloaded   parallel-3.2.2.0
Downloading  parsers-0.12.11
Downloaded   parsers-0.12.11
Downloading  primitive-0.7.4.0
Downloaded   primitive-0.7.4.0
Downloading  random-1.2.1.1
Downloaded   random-1.2.1.1
Downloading  regex-base-0.94.0.2
Downloaded   regex-base-0.94.0.2
Downloading  regex-tdfa-1.3.2
Downloaded   regex-tdfa-1.3.2
Downloading  scientific-0.3.7.0
Downloaded   scientific-0.3.7.0
Downloading  semialign-1.2.0.1
Downloaded   semialign-1.2.0.1
Downloading  semigroupoids-5.3.7
Downloaded   semigroupoids-5.3.7
Downloading  splitmix-0.1.0.4
Downloaded   splitmix-0.1.0.4
Downloading  statistics-0.16.1.2
Downloaded   statistics-0.16.1.2
Downloading  strict-0.4.0.1
Downloaded   strict-0.4.0.1
Downloading  tagged-0.8.6.1
Downloaded   tagged-0.8.6.1
Downloading  tar-0.5.1.1
Downloaded   tar-0.5.1.1
Downloading  tasty-1.4.3
Downloaded   tasty-1.4.3
Downloading  tasty-golden-2.3.5
Downloaded   tasty-golden-2.3.5
Downloading  tasty-hunit-0.10.0.3
Downloaded   tasty-hunit-0.10.0.3
Downloading  temporary-1.3
Downloaded   temporary-1.3
Downloading  text-binary-0.2.1.1
Downloaded   text-binary-0.2.1.1
Downloading  text-short-0.1.5
Downloaded   text-short-0.1.5
Downloading  th-abstraction-0.4.5.0
Downloaded   th-abstraction-0.4.5.0
Downloading  th-compat-0.1.4
Downloaded   th-compat-0.1.4
Downloading  these-1.1.1.1
Downloaded   these-1.1.1.1
Downloading  time-compat-1.9.6.1
Downloaded   time-compat-1.9.6.1
Downloading  transformers-compat-0.7.2
Downloaded   transformers-compat-0.7.2
Downloading  tree-diff-0.2.2
Downloaded   tree-diff-0.2.2
Downloading  typed-process-0.2.10.1
Downloaded   typed-process-0.2.10.1
Downloading  universe-base-1.1.3
Downloaded   universe-base-1.1.3
Downloading  universe-reverse-instances-1.1.1
Downloaded   universe-reverse-instances-1.1.1
Downloading  unliftio-core-0.2.0.1
Downloaded   unliftio-core-0.2.0.1
Downloading  unordered-containers-0.2.19.1
Downloaded   unordered-containers-0.2.19.1
Downloading  uuid-types-1.0.5
Downloaded   uuid-types-1.0.5
Downloading  vector-0.13.0.0
Downloaded   vector-0.13.0.0
Downloading  vector-algorithms-0.9.0.1
Downloaded   vector-algorithms-0.9.0.1
Downloading  vector-binary-instances-0.2.5.2
Downloaded   vector-binary-instances-0.2.5.2
Downloading  vector-stream-0.1.0.0
Downloaded   vector-stream-0.1.0.0
Downloading  vector-th-unbox-0.2.2
Downloaded   vector-th-unbox-0.2.2
Downloading  witherable-0.4.2
Downloaded   witherable-0.4.2
Downloading  zinza-0.2
Downloaded   zinza-0.2
Build profile: -w ghc-9.4.4 -O1
In order, the following would be built (use -v for more details):
 - Diff-0.4.1 (lib) (requires build)
 - HsYAML-0.2.1.1 (lib) (requires build)
 - OneTuple-0.3.1 (lib) (requires build)
 - Only-0.1 (lib) (requires build)
 - StateVar-1.2.2 (lib) (requires build)
 - attoparsec-0.14.4 (lib:attoparsec-internal) (requires build)
 - base-compat-0.12.2 (lib) (requires build)
 - base-orphans-0.8.7 (lib) (requires build)
 - base16-bytestring-1.0.2.0 (lib) (requires build)
 - binary-orphans-1.0.3 (lib) (requires build)
 - bytestring-builder-0.10.8.2.0 (lib) (requires build)
 - call-stack-0.4.0 (lib) (requires build)
 - colour-2.3.6 (lib) (requires build)
 - cryptohash-sha256-0.11.102.1 (lib) (requires build)
 - data-default-class-0.1.2.0 (lib:data-default-class) (requires build)
 - dlist-1.0 (lib) (requires build)
 - generic-lens-lite-0.1 (lib) (requires build)
 - generically-0.1 (lib) (requires build)
 - hashable-1.4.2.0 (lib) (requires build)
 - hsc2hs-0.68.8 (exe:hsc2hs) (requires build)
 - indexed-traversable-0.1.2 (lib) (requires build)
 - integer-logarithms-1.0.3.1 (lib) (requires build)
 - js-chart-2.9.4.1 (lib) (requires build)
 - parallel-3.2.2.0 (lib) (requires build)
 - primitive-0.7.4.0 (lib) (requires build)
 - regex-base-0.94.0.2 (lib) (requires build)
 - splitmix-0.1.0.4 (lib) (requires build)
 - tagged-0.8.6.1 (lib) (requires build)
 - tar-0.5.1.1 (lib) (requires build)
 - text-binary-0.2.1.1 (lib:text-binary) (requires build)
 - th-abstraction-0.4.5.0 (lib) (requires build)
 - th-compat-0.1.4 (lib) (requires build)
 - transformers-compat-0.7.2 (lib) (requires build)
 - unliftio-core-0.2.0.1 (lib) (requires build)
 - vector-stream-0.1.0.0 (lib) (requires build)
 - zinza-0.2 (lib) (requires build)
 - contravariant-1.5.5 (lib) (requires build)
 - base-compat-batteries-0.12.2 (lib) (requires build)
 - ansi-terminal-0.11.4 (lib) (requires build)
 - unordered-containers-0.2.19.1 (lib) (requires build)
 - time-compat-1.9.6.1 (lib) (requires build)
 - text-short-0.1.5 (lib) (requires build)
 - data-fix-0.3.2 (lib) (requires build)
 - case-insensitive-1.2.1.0 (lib) (requires build)
 - async-2.2.4 (lib) (requires build)
 - lukko-0.1.1.3 (lib) (requires build)
 - code-page-0.2.1 (lib) (requires build)
 - scientific-0.3.7.0 (lib) (requires build)
 - regex-tdfa-1.3.2 (lib) (requires build)
 - random-1.2.1.1 (lib) (requires build)
 - universe-base-1.1.3 (lib) (requires build)
 - distributive-0.6.2.1 (lib) (requires build)
 - network-uri-2.6.4.2 (lib) (requires build)
 - Glob-0.10.2 (lib) (requires build)
 - vector-0.13.0.0 (lib) (requires build)
 - ansi-wl-pprint-0.6.9 (lib) (requires build)
 - charset-0.3.9 (lib) (requires build)
 - typed-process-0.2.10.1 (lib) (requires build)
 - attoparsec-0.14.4 (lib) (requires build)
 - uuid-types-1.0.5 (lib) (requires build)
 - temporary-1.3 (lib) (requires build)
 - QuickCheck-2.14.2 (lib) (requires build)
 - universe-reverse-instances-1.1.1 (lib) (requires build)
 - comonad-5.0.8 (lib) (requires build)
 - vector-th-unbox-0.2.2 (lib) (requires build)
 - vector-binary-instances-0.2.5.2 (lib) (requires build)
 - math-functions-0.3.4.2 (lib) (requires build)
 - indexed-traversable-instances-0.1.1.1 (lib) (requires build)
 - bitvec-1.1.3.0 (lib) (requires build)
 - optparse-applicative-0.17.0.0 (lib) (requires build)
 - parsers-0.12.11 (lib) (requires build)
 - ini-0.4.2 (lib) (requires build)
 - cassava-0.5.3.0 (lib) (requires build)
 - bifunctors-5.5.14 (lib) (requires build)
 - mwc-random-0.15.0.2 (lib) (requires build)
 - witherable-0.4.2 (lib) (requires build)
 - vector-algorithms-0.9.0.1 (lib) (requires build)
 - tasty-1.4.3 (lib) (requires build)
 - semigroupoids-5.3.7 (lib) (requires build)
 - assoc-1.0.2 (lib) (requires build)
 - dense-linear-algebra-0.1.0.0 (lib) (requires build)
 - tasty-hunit-0.10.0.3 (lib) (requires build)
 - tasty-golden-2.3.5 (lib) (requires build)
 - lattices-2.0.3 (lib) (requires build)
 - these-1.1.1.1 (lib) (requires build)
 - strict-0.4.0.1 (lib) (requires build)
 - semialign-1.2.0.1 (lib) (requires build)
 - aeson-2.1.1.0 (lib) (requires build)
 - tree-diff-0.2.2 (lib) (requires build)
 - statistics-0.16.1.2 (lib) (requires build)
 - microstache-1.0.2.3 (lib) (requires build)
 - criterion-measurement-0.2.0.0 (lib) (requires build)
 - binary-instances-1.0.3 (lib) (requires build)
 - ShellCheck-0.8.0 (lib) (requires build)
 - criterion-1.6.0.0 (lib) (requires build)
 - cabal-install-parsers-0.5 (lib) (first run)
 - haskell-ci-0.15.20[23](https://github.com/haskell-CI/haskell-ci/actions/runs/4025432861/jobs/6918641652#step:18:24)01[27](https://github.com/haskell-CI/haskell-ci/actions/runs/4025432861/jobs/6918641652#step:18:28) (lib:haskell-ci-internal) (first run)
 - cabal-install-parsers-0.5 (test:cabal-parsers-index) (first run)
 - cabal-install-parsers-0.5 (test:cabal-parsers-golden) (first run)
 - cabal-install-parsers-0.5 (bench:cabal-parsers-bench) (first run)
 - haskell-ci-0.15.202[30](https://github.com/haskell-CI/haskell-ci/actions/runs/4025432861/jobs/6918641652#step:18:31)[127](https://github.com/haskell-CI/haskell-ci/actions/runs/4025432861/jobs/6918641652#step:18:128) (exe:haskell-ci) (first run)
 - haskell-ci-0.15.[202](https://github.com/haskell-CI/haskell-ci/actions/runs/4025432861/jobs/6918641652#step:18:203)[301](https://github.com/haskell-CI/haskell-ci/actions/runs/4025432861/jobs/6918641652#step:18:302)27 (test:golden) (first run)
using '/__w/haskell-ci/haskell-ci' as project root

At least cabal-install doesn't actually build anything, but even downloading (and hitting the internet) is not good.

EDIT: previously the cabal build also first told what it would build and then start downloading, not it first downloads and then tells, and then starts building.

@Bodigrim
Copy link
Collaborator

EDIT: previously the cabal build also first told what it would build and then start downloading, not it first downloads and then tells, and then starts building.

I think this behaviour started after #8500, but I might have missed couple of nightly builds in between.

@phadej
Copy link
Collaborator Author

phadej commented Feb 11, 2023

This is actually somewhat bad for CI which only cache cabal store.

Previously: if everything is in store, the package sources are not redownloaded, and everything proceeds. With this (buggy) behaviour, CI should either cache package download location (for no real reason) or redownload the package sources (for no real reason either).

EDIT: actually cabal-install-3.9.0.0 doesn't seem to redownload sources if the package is built (i.e. in the store), so above is not correct, but then the behavior is somewhat confusing.

@gbaz
Copy link
Collaborator

gbaz commented Feb 11, 2023

perhaps related: #8708

@Mikolaj
Copy link
Member

Mikolaj commented Feb 14, 2023

Could you kindly check if the bug if perhaps gone in this version with some fixes: https://gitlab.haskell.org/haskell/cabal/-/pipelines/63307

The commandline to get the Linux version via ghcup is
ghcup --no-cache install cabal -u 'https://gitlab.haskell.org/haskell/cabal/-/jobs/1376184/artifacts/raw/out/cabal-install-3.9-x86_64-linux-alpine.tar.xz' internal-second-prerelease-of-3.10

@gbaz
Copy link
Collaborator

gbaz commented Feb 14, 2023

@Mikolaj is there any particular fix that would handle this? I don't recall seeing one come across my way yet, and I was intending to get to looking at this soon...

@Mikolaj
Copy link
Member

Mikolaj commented Feb 14, 2023

Not at all, no particular fix; that's just a 100% blind shot in the hopes that it "fixed itself" by laying around long enough.

@Mikolaj
Copy link
Member

Mikolaj commented Feb 14, 2023

Or perhaps the symptoms change slightly... But, anyway, the new dogfooding binary would be exercised and often good things emerge from that.

@Mikolaj
Copy link
Member

Mikolaj commented Feb 15, 2023

Another one to try. This one is not a hip shot, but should really fix it (artifacts at the bottom of the right pane of this page): https://github.com/haskell/cabal/actions/runs/4179798663

@ulysses4ever
Copy link
Collaborator

I'm adding a label that we should consider closing it because it's pending verification that #8769 indeed fixed it.

@phadej
Copy link
Collaborator Author

phadej commented Mar 12, 2023

3.10.1.0 doesn't seem to do this anymore. Thans!

@andreasabel
Copy link
Member

andreasabel commented Oct 16, 2023

This issue is labeled regression, but are there any release version of cabal-install affected, and if yes, which versions?
Maybe none, since this was opened as a regression in 3.9.0.0 which is not a released version. In this case the label should be changed to regression in 3.9.0.0 to make clear no released version is affected.
Can someone confirm?

@Mikolaj
Copy link
Member

Mikolaj commented Oct 17, 2023

I can confirm our eventual understanding was this has been introduced between the last point release of 3.6.* and the first of 3.8.* and so no published release has been affected (so a more precisely label would be regression_in_master). We might have been right.

@Mikolaj Mikolaj added the regression on master Regression that is unreleased and needs to be fixed before release label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression on master Regression that is unreleased and needs to be fixed before release status: consider closing type: bug type: regression
Projects
None yet
Development

No branches or pull requests

6 participants