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

Get package name from completed information #4789 #4791

Merged
merged 1 commit into from
May 2, 2019

Conversation

snoyberg
Copy link
Contributor

@snoyberg snoyberg commented May 1, 2019

The completed package information already contains the package name,
bypassing the need for a package completion call if the cache (lock
file) already contains that information. This bypasses a spurious
warning about lacking cryptographic hashes, and likely improves
performance, for the repo and archive cases.

This wasn't discovered initially because the Hackage use case never had
an overhead: the specification of a RPLIHackage already contains the
package name in all cases.

The completed package information already contains the package name,
bypassing the need for a package completion call if the cache (lock
file) already contains that information. This bypasses a spurious
warning about lacking cryptographic hashes, and likely improves
performance, for the repo and archive cases.

This wasn't discovered initially because the Hackage use case never had
an overhead: the specification of a RPLIHackage already contains the
package name in all cases.
@snoyberg snoyberg requested a review from qrilka May 1, 2019 08:21
@snoyberg snoyberg merged commit 28138a9 into master May 2, 2019
@snoyberg snoyberg deleted the 4789-package-name-from-completed branch May 2, 2019 03:38
pliIdent :: PackageLocationImmutable -> PackageIdentifier
pliIdent (PLIHackage ident _ _) = ident
pliIdent (PLIArchive _ pm) = pmIdent pm
pliIdent (PLIRepo _ pm) = pmIdent pm
Copy link
Contributor

Choose a reason for hiding this comment

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

@snoyberg there's already packageLocationIdent -

packageLocationIdent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doh, thanks. I'll send a PR to fix that.

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.

2 participants