ghc-pkg: recompute `abi-depends` for updated packages
ClosedPublic

Authored by austin on Nov 6 2017, 12:10 AM.

Details

Summary

See Note [Recompute abi-depends] for more information.

Signed-off-by: Austin Seipp <aseipp@pobox.com>

Test Plan

./validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
austin created this revision.Nov 6 2017, 12:10 AM
austin planned changes to this revision.Nov 6 2017, 12:11 AM
austin added inline comments.
testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
8

I also have no clue why these were out of date?

utils/ghc-pkg/Main.hs
1281–1285

I didn't look hard, but surely there's something that does this and isn't so horrible, right?

bgamari added inline comments.Nov 6 2017, 4:00 PM
testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
8

IIRC the testsuite driver has a normalization case for package versions like this, comparing modulo version.

austin added inline comments.Nov 6 2017, 5:00 PM
testsuite/tests/safeHaskell/check/pkg01/safePkg01.stdout
8

Ah, that's right. I guess accept simply ignores this and updates the file blindly anyway...

austin marked 3 inline comments as done.Nov 6 2017, 5:23 PM
ezyang requested changes to this revision.Nov 16 2017, 5:47 PM

I think this patch is a strict improvement over the current situation, but I don't think it is correct: see my comment about package database stacks.

utils/ghc-pkg/Main.hs
1217

This doesn't take a package database stack, so I am doubtful this works correctly when a dependency crosses package databases. The lookup will always be empty in this case, right? We want to do the lookup on all of the package databases below this one in the stack.

Any updates on this? I quickly ran into Trac #14381 when smoke-testing GHC 8.4.

Any updates on this? I quickly ran into Trac #14381 when smoke-testing GHC 8.4.

Ah -- no, sorry. I've been meaning to rework this for a week or two, but this bug unblocked us at $WORK and I've had four million things to do since then! (Some things never change.)

What is the ETA around 8.4? I can devote some time next week to this and try to polish this off.

Any updates on this? I quickly ran into Trac #14381 when smoke-testing GHC 8.4.

Ah -- no, sorry. I've been meaning to rework this for a week or two, but this bug unblocked us at $WORK and I've had four million things to do since then! (Some things never change.)

What is the ETA around 8.4? I can devote some time next week to this and try to polish this off.

The release date is set for mid-February so there is some time. But, as usual, sooner is better so we can get it merged. I suspect I ran into this bug yesterday while trying to test 8.4-alpha1.

Any updates on this? I quickly ran into Trac #14381 when smoke-testing GHC 8.4.

Ah -- no, sorry. I've been meaning to rework this for a week or two, but this bug unblocked us at $WORK and I've had four million things to do since then! (Some things never change.)

What is the ETA around 8.4? I can devote some time next week to this and try to polish this off.

The release date is set for mid-February so there is some time. But, as usual, sooner is better so we can get it merged. I suspect I ran into this bug yesterday while trying to test 8.4-alpha1.

Alright, I have this week off so that should be doable sometime post-Christmas!

Any update on this, @austin?

bgamari added inline comments.Jan 26 2018, 7:37 PM
utils/ghc-pkg/Main.hs
1225

Should this perhaps mention the package names so the user knows roughly what they should expect to break if this happens?

I'll be doing an update on this tonight hopefully once I get done with some other stuff.

alexbiehl added subscribers: shlevy, alexbiehl.EditedMon, Apr 30, 6:55 PM

@austin what's the status on this? @shlevy put this patch into nixpkgs already. Would be good to have this upstream.

juhp added a subscriber: juhp.Sun, May 6, 12:10 AM
juhp added a comment.EditedSun, May 6, 12:16 AM

The patch is also in Fedora 28... I am quite surprised that it didn't get into ghc-8.4 yet.

I decided to stay with 8.0.2 for an important long term infrastructure project largely because of this issue.

bgamari accepted this revision.Sun, May 20, 12:18 PM
bgamari added a subscriber: tdammers.

Alright, I'm going to merge this to master and ghc-8.4 since this issue does appear to be affecting users and distributions have started applying this patch themselves.

@tdammers will be looking at fixing the treatment of multiple package databases.

This revision was not accepted when it landed; it landed in state Changes Planned.Sun, May 20, 7:43 PM
This revision was automatically updated to reflect the committed changes.