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

Validate PackageInfo.g when loading packages #2726

Merged

Conversation

fingolfin
Copy link
Member

This helps package authors notice earlier if a package update they made failed.

One could also be more aggressive and validate every package record as we load it; but I have far too many packages which are not validating sitting around (e.g. undeposited ones from gap-packages)

@fingolfin fingolfin added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker) topic: library release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Aug 22, 2018
@olexandr-konovalov
Copy link
Member

olexandr-konovalov commented Aug 22, 2018

Nice - from the packages redistributed with GAP, there is only one that triggers a warning:

Loading crime ... 
#E  component `Date' must be bound to a string of the form `dd/mm/yyyy'
#E Validation of package crime from /home/travis/build/gap-system/gap/pkg/crime failed 

because its date is 01/6/2011 and there were no new releases ever since.

@codecov
Copy link

codecov bot commented Aug 22, 2018

Codecov Report

Merging #2726 into master will decrease coverage by 0.48%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master    #2726      +/-   ##
==========================================
- Coverage   76.37%   75.88%   -0.49%     
==========================================
  Files         431      481      +50     
  Lines      220298   241315   +21017     
==========================================
+ Hits       168251   183123   +14872     
- Misses      52047    58192    +6145
Impacted Files Coverage Δ
lib/package.gi 71.06% <66.66%> (+1%) ⬆️
lib/session.g 56.86% <0%> (-33.77%) ⬇️
src/gapstate.h 71.42% <0%> (-28.58%) ⬇️
lib/random.g 93.33% <0%> (-6.67%) ⬇️
src/calls.h 95.74% <0%> (-4.26%) ⬇️
src/objects.c 79.81% <0%> (-1.89%) ⬇️
src/iostream.c 63.49% <0%> (-1.49%) ⬇️
src/system.c 70.18% <0%> (-1.48%) ⬇️
src/gvars.c 82.6% <0%> (-1.24%) ⬇️
src/saveload.c 68.25% <0%> (-0.92%) ⬇️
... and 119 more

@olexandr-konovalov
Copy link
Member

@fingolfin can you rebase, and I will be happy to approve this?

@olexandr-konovalov olexandr-konovalov added this to the GAP 4.10.0 milestone Sep 2, 2018
This helps package authors notice earlier if a package update
they made failed.
@fingolfin
Copy link
Member Author

Rebased.

@olexandr-konovalov olexandr-konovalov merged commit 5c16b0d into gap-system:master Sep 7, 2018
@fingolfin fingolfin deleted the mh/LoadPackageValidation branch September 7, 2018 10:22
@fingolfin fingolfin added release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: added PRs introducing changes that have since been mentioned in the release notes topic: library topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants