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

Don't error out on missing latest revision while constructing a build plan #4573

Merged
merged 1 commit into from Feb 7, 2019

Conversation

qrilka
Copy link
Contributor

@qrilka qrilka commented Feb 6, 2019

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Tested manually.
Actually I've fixed it earlier in https://github.com/commercialhaskell/stack/tree/curator-stackage-build-with-stack as I caught it during Stackage build. And it was me who added it as a part of #4479 - sorry
Fixes #4572

Copy link
Contributor

@dbaynard dbaynard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Impressively quick response to #4572, too.

@@ -426,9 +426,15 @@ addDep treatAsDep' name = do
askPkgLoc = liftRIO $ do
mrev <- getLatestHackageRevision name version
case mrev of
Nothing -> error $ "No package revision found for: " <> show name
Nothing -> do
-- this could happen for GHC boot libraries missing from Hackage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a comment in another part of the code which cleared up my misunderstanding the other day.

-- Note that we use getLatestHackageRevision below, even though it's
-- non-reproducible, to avoid user confusion. In any event,
-- reproducible builds should be done by updating your config
-- files!

So if stack doesn't find a revision, that's not a problem. If it does find a revision, it will use that. That's correct, then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now when you ask it that way I'm not completely sure that it's 100% correct logic - the reason is that this PIOnlyInstalled should appear only for global libraries (GHC boot packages) and for those we don't have guarantees about proper versions/revisions on Hackage. From the other side as far as I understand we don't have any executables in those packages so practically tellExecutablesUpstream should be NOOP.

@dbaynard dbaynard mentioned this pull request Feb 7, 2019
@qrilka
Copy link
Contributor Author

qrilka commented Feb 7, 2019

@dbaynard I've fixed it earlier yesterday while doing Stackage builds

@dbaynard dbaynard merged commit 4e56620 into master Feb 7, 2019
@qrilka qrilka deleted the no-error-on-missing-boot-library-revision branch February 7, 2019 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No package revision found for: PackageName "ghc"
2 participants