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

Gb/build with 9.2 #7907

Closed
wants to merge 8 commits into from
Closed

Gb/build with 9.2 #7907

wants to merge 8 commits into from

Conversation

gbaz
Copy link
Collaborator

@gbaz gbaz commented Jan 13, 2022

build all now works with 9.2. For now, removing vendoring of cabal-doctest (not sure why it was vendored to begin with). If that's wrong let me know. There were no real comments why it was vendored. Also removing a few stray allow-newer clauses no longer necessary, apparently.

@Mikolaj
Copy link
Member

Mikolaj commented Jan 13, 2022

Amazing. That probably means @Bodigrim bumped all remaining hackage-security bounds on Hackage in advance of the release. And that's fine, because hackage-security CI passes.

See also #7747,

@fgaz
Copy link
Member

fgaz commented Jan 13, 2022

Nice! Could you add 9.0 and 9.2 CI jobs too?

@Bodigrim
Copy link
Collaborator

Amazing. That probably means @Bodigrim bumped all remaining hackage-security bounds on Hackage in advance of the release. And that's fine, because hackage-security CI passes.

Not me this time :) I think resolv was the last stumbling block and @gbaz just revised it.

@phadej
Copy link
Collaborator

phadej commented Jan 13, 2022

IIRC cabal-doctest was vendored because some dependency used it in its custom setup, and there was a change in Cabal which broke it.

If you checkout the commit it was added, and (--dry) build with --index-state of that date, you'll see that:

[Cabal-tests-3:test:"hackage-tests"]
 ├─ Cabal-tree-diff-3.5.0.0
 │   └─ tree-diff-0.1
 │       ├─ QuickCheck-2.14.1
 │       │   ├─ containers-0.5.6.2 ┄┄
 │       │   ├─ random-1.2.0 ┄┄
 │       │   └─ template-haskell-2.10.0.0 ┄┄
 │       ├─ aeson-1.5.4.1
 │       │   ├─ attoparsec-0.13.2.4
 │       │   │   ├─ scientific-0.3.6.2
 │       │   │   │   ├─ hashable-1.3.0.0 ┄┄
 │       │   │   │   ├─ integer-logarithms-1.0.3
 │       │   │   │   │   └─ array-0.5.1.0 ┄┄
 │       │   │   │   └─ primitive-0.7.1.0
 │       │   │   │       ├─ deepseq-1.4.1.1 ┄┄
 │       │   │   │       ├─ fail-4.9.0.0 ┄┄
 │       │   │   │       └─ transformers-0.4.2.0 ┄┄
 │       │   │   └─ semigroups-0.19.1 ┄┄
 │       │   ├─ base-compat-batteries-0.11.2
 │       │   │   ├─ base-compat-0.11.2
 │       │   │   │   └─ unix-2.7.1.0 ┄┄
 │       │   │   ├─ bifunctors-5.5.8
 │       │   │   │   └─ [comonad-5.0.6:all]
 │       │   │   │       ├─ comonad-5.0.6
 │       │   │   │       │   └─ [distributive-0.6.2:all]
 │       │   │   │       │       ├─ distributive-0.6.2
 │       │   │   │       │       │   ├─ base-orphans-0.8.3
 │       │   │   │       │       │   │   └─ base-4.8.2.0 ┄┄
 │       │   │   │       │       │   └─ semigroups-0.19.1 ┄┄
 │       │   │   │       │       └─ [setup]
 │       │   │   │       │           └─ cabal-doctest-1.0.8
 │       │   │   │       │               └─ Cabal-3.5.0.0 ┄┄
 │       │   │   │       └─ [setup]
 │       │   │   │           └─ cabal-doctest-1.0.8 ┄┄

Luckily comonad doesn't use build-type: Custom anymore.

TBH, #7802 would be useful for weighting in cabal-install dependencies. No build-type: Custom => less head ache (while in the middle of development)

@phadej
Copy link
Collaborator

phadej commented Jan 13, 2022

Amazing. That probably means @Bodigrim bumped all remaining hackage-security bounds on Hackage in advance of the release. And that's fine, because hackage-security CI passes.

Not me this time :) I think resolv was the last stumbling block and @gbaz just revised it.

I'm a co-maintainer of resolv, but didn't yet updated the Hackage maintainer field as there weren't need to update anything else.

I see a PR from 5 days ago, and now there is a revision. and no mention that revision was made.

(EDT: though it looks like herbert forgot to give me rights on GitHub, though I have them on Hackage).

@gbaz
Copy link
Collaborator Author

gbaz commented Jan 14, 2022

You're right I should have mentioned the revision on the github. Anyway, I made a revision!

@phadej
Copy link
Collaborator

phadej commented Jan 14, 2022

Also windns. That doesn't have an issue or PR at all :(

Now I have to figure out what was updated in the meantime.

@fgaz
Copy link
Member

fgaz commented Jan 27, 2022

@phadej could you push 8.10.7, 9.0.2, and 9.2.1 containers?
edit: or even just 9.2.1. I can revert the changes to 8.10 and 9.0 if that's too much trouble

@fgaz
Copy link
Member

fgaz commented Feb 2, 2022

It looks like those images can't be easily updated because they use hvr's PPA: phadej/docker-ghc#8

We'll have to switch to one of

  • ghcup
  • the official haskell docker images
  • the haskell github action
  • gitlab

just switching container is easier for now, so let's try that

phadej's images use hvr's ppa, which stops at ghc 9.0
@Mikolaj
Copy link
Member

Mikolaj commented Feb 2, 2022

One or two jobs are already switched to ghcup, but these jobs are very different beasts, so this wouldn't carry over easily, I'm sure.

@fgaz
Copy link
Member

fgaz commented Feb 2, 2022

P.hs:1:8: error:
    Could not find module `Prelude'
    Perhaps you haven't installed the profiling libraries for package `base-4.13.0.0'?

[...]

*** unexpected failure for PackageTests/NewBuild/T3827/cabal.test.hs

huh. I guess that image does not have profiling libraries?

@AlistairB
Copy link

AlistairB commented Feb 2, 2022

huh. I guess that image does not have profiling libraries?

Yup, they are stripped out to save some space. This was mimicked from the old haskell debian packages. I don't think this is a huge saving though, I'd be happy to put them back if there is a need.

Although the other thing to consider is the official images only keep the last 2-3 major versions of GHC up to date with cabal-install + stack. So for example 8.8 still has cabal-install 3.4 and won't be updated.

andreabedini added a commit to andreabedini/cabal that referenced this pull request Feb 8, 2022
- Remove cabal-plan, we actually never call it (I think)
- Remove vendored cabal-doctest
- Remove few stray allow-newer clauses no longer necessary, apparently

Originally done by @gbaz in PR haskell#7907.
@gbaz
Copy link
Collaborator Author

gbaz commented Feb 11, 2022

What is the plan here? If we continue to be blocked on getting CI working with newer ghcs beyond a certain point, I would rather merge the fixes that allow cabal to build with newer ghcs, and then have a separate pr to actually give CI on those configurations.

@fgaz
Copy link
Member

fgaz commented Feb 11, 2022

@gbaz, @andreabedini is working on it in #7952

@andreabedini
Copy link
Collaborator

My work on #7952 is going a bit slowly because each workflow run has to be approved by a maintainer, which means it might that days to test again after fixing a typo.

Is there any chance we can relax that constraint, even temporarily?

@fgaz
Copy link
Member

fgaz commented Feb 12, 2022

I just found and enabled a setting that does just that, you should be able to iterate quickly now. If that does not work, I believe you can test the workflows on your fork

@andreabedini andreabedini self-assigned this Feb 18, 2022
@andreabedini
Copy link
Collaborator

I'll review this soon but I believe off this changes have been incorporated into #7952. You can see a failed build here. @Mikolaj has already suggested a fix in #7952 (comment).

fgaz pushed a commit that referenced this pull request Feb 19, 2022
* Avoid templating GitHub Actions workflow

GitHub Actions workflow have sufficient power to express what we need.
We don't need to maintain and additional templating solution on top.

* Add GHC 9.2, bump bounds, fix syntax

* Switch to official haskell image

* Always run cli tests for ghc 8.2 and above

* Remove step to regenerate GitHub Actions workflows

* Fix missed reference to GHC version

* Fix yaml syntax

* Fix type in the GHC version

* More CI changes

- Run bootstrap.yml on ubuntu-latest
- Use explicit matrix for linux.yml
- Drop containers in favour of haskell setup action
- Drop workaround for ancient git

* Remove unneeded package from CI setup

I belive this is only necessary to run `cabal man` which we do not in
the CI.

* Drop old GHCs from the CI

* Switch macos.yml to haskell/action/setup

Also add the same GHC versions as Linux.

* Simplify CI

- Remove cabal-plan, we actually never call it (I think)
- Remove vendored cabal-doctest
- Remove few stray allow-newer clauses no longer necessary, apparently

Originally done by @gbaz in PR #7907.

* Mark GHC 9.2.1 as experimental

* Remove reference to cabal-plan from validate.sh

* setup-haskell action already runs cabal update

* Add missing build matrix in test-windows-dogfood

* Replace cabal-plan list-bin with cabal list-bin

* Enable caching in the CI

* Fix typo

* Remove continue-on-error until I figure it out

* Keep naming consistent

* Temporarily disable 8.0.2 on macos

* Add missing step id

* Tweaks

Remove workaround for nektos/act, it accidentally sneaked in.

* More tweaks

* Tweaks

* Restore cabal-plan, temporarily mark everything experimental

cabal list-bin doesn't seem to work like cabal-plan does.

* Tweaks

* Ensure cabal-plan executable gets built

* Install automake on MacOS

* Tweaks

* Tweaks

Link experimental flags to relative GitHub issues

* Fix typo
@andreabedini andreabedini mentioned this pull request Feb 22, 2022
22 tasks
@jneira
Copy link
Member

jneira commented Feb 22, 2022

It seems this can be closed, no? we have succesful build with failing tests

@Mikolaj
Copy link
Member

Mikolaj commented Feb 22, 2022

Could somebody make a diff a verify? I believe this can be done both on commandline (or with gitk) and also using github.

@gbaz
Copy link
Collaborator Author

gbaz commented Feb 22, 2022

No need. This branch was just intended to get things working. It wasn't special. If another branch has picked up enough changes to get things working, I'm happy :-)

@gbaz gbaz closed this Feb 22, 2022
@andreabedini
Copy link
Collaborator

andreabedini commented Feb 23, 2022

We still fail on 9.2 because of the overlapping patterns (see https://github.com/haskell/cabal/runs/5285920627?check_suite_focus=true#step:8:1574).

I will have a go at it today. Tracking in #8012

@andreabedini
Copy link
Collaborator

FYI cabal now builds with GHC 9.2 but some haddock related tests fail because of #7987 this particular issue is truly done and dusted :)

Kleidukos pushed a commit to Kleidukos/cabal that referenced this pull request Mar 30, 2022
* Avoid templating GitHub Actions workflow

GitHub Actions workflow have sufficient power to express what we need.
We don't need to maintain and additional templating solution on top.

* Add GHC 9.2, bump bounds, fix syntax

* Switch to official haskell image

* Always run cli tests for ghc 8.2 and above

* Remove step to regenerate GitHub Actions workflows

* Fix missed reference to GHC version

* Fix yaml syntax

* Fix type in the GHC version

* More CI changes

- Run bootstrap.yml on ubuntu-latest
- Use explicit matrix for linux.yml
- Drop containers in favour of haskell setup action
- Drop workaround for ancient git

* Remove unneeded package from CI setup

I belive this is only necessary to run `cabal man` which we do not in
the CI.

* Drop old GHCs from the CI

* Switch macos.yml to haskell/action/setup

Also add the same GHC versions as Linux.

* Simplify CI

- Remove cabal-plan, we actually never call it (I think)
- Remove vendored cabal-doctest
- Remove few stray allow-newer clauses no longer necessary, apparently

Originally done by @gbaz in PR haskell#7907.

* Mark GHC 9.2.1 as experimental

* Remove reference to cabal-plan from validate.sh

* setup-haskell action already runs cabal update

* Add missing build matrix in test-windows-dogfood

* Replace cabal-plan list-bin with cabal list-bin

* Enable caching in the CI

* Fix typo

* Remove continue-on-error until I figure it out

* Keep naming consistent

* Temporarily disable 8.0.2 on macos

* Add missing step id

* Tweaks

Remove workaround for nektos/act, it accidentally sneaked in.

* More tweaks

* Tweaks

* Restore cabal-plan, temporarily mark everything experimental

cabal list-bin doesn't seem to work like cabal-plan does.

* Tweaks

* Ensure cabal-plan executable gets built

* Install automake on MacOS

* Tweaks

* Tweaks

Link experimental flags to relative GitHub issues

* Fix typo
andreabedini added a commit to andreabedini/cabal that referenced this pull request May 5, 2022
* Avoid templating GitHub Actions workflow

GitHub Actions workflow have sufficient power to express what we need.
We don't need to maintain and additional templating solution on top.

* Add GHC 9.2, bump bounds, fix syntax

* Switch to official haskell image

* Always run cli tests for ghc 8.2 and above

* Remove step to regenerate GitHub Actions workflows

* Fix missed reference to GHC version

* Fix yaml syntax

* Fix type in the GHC version

* More CI changes

- Run bootstrap.yml on ubuntu-latest
- Use explicit matrix for linux.yml
- Drop containers in favour of haskell setup action
- Drop workaround for ancient git

* Remove unneeded package from CI setup

I belive this is only necessary to run `cabal man` which we do not in
the CI.

* Drop old GHCs from the CI

* Switch macos.yml to haskell/action/setup

Also add the same GHC versions as Linux.

* Simplify CI

- Remove cabal-plan, we actually never call it (I think)
- Remove vendored cabal-doctest
- Remove few stray allow-newer clauses no longer necessary, apparently

Originally done by @gbaz in PR haskell#7907.

* Mark GHC 9.2.1 as experimental

* Remove reference to cabal-plan from validate.sh

* setup-haskell action already runs cabal update

* Add missing build matrix in test-windows-dogfood

* Replace cabal-plan list-bin with cabal list-bin

* Enable caching in the CI

* Fix typo

* Remove continue-on-error until I figure it out

* Keep naming consistent

* Temporarily disable 8.0.2 on macos

* Add missing step id

* Tweaks

Remove workaround for nektos/act, it accidentally sneaked in.

* More tweaks

* Tweaks

* Restore cabal-plan, temporarily mark everything experimental

cabal list-bin doesn't seem to work like cabal-plan does.

* Tweaks

* Ensure cabal-plan executable gets built

* Install automake on MacOS

* Tweaks

* Tweaks

Link experimental flags to relative GitHub issues

* Fix typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants