stackage-curator should throw an error if a package name is mistyped or otherwise non-existent
Closed this issue · 2 comments
I noticed that stackage-curator currently simply ignores a non-existent package name here.
I'd be interested in submitting a PR to fix this but I'm unfamiliar with the code base and unsure where to add such a check. I guess it should happen soon after parsing the build-constraints.yaml file.
This is a great idea, thanks for bringing it up. I believe the right place to start is the Stackage.BuildPlan.newBuildPlan
function. That function takes a BuildConstraints
value (which represents everything in the build-constraints.yaml) and combines it with the actual package index information to create a BuildPlan
. It appears that we should additionally collect a Set
of all PackageName
s referenced, remove all such package names seen in the index, and then raise an error if any are left over.
That's a guess on my part, is that enough of a pointer in the (hopefully) right direction?
Thanks! Your pointer was perfect! :)