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

Improve IsPackageLoaded #2877

Merged
merged 1 commit into from
Sep 28, 2018
Merged

Conversation

fingolfin
Copy link
Member

First off, it now aborts immediately if the package is not loaded, and
doesn't call the package's AvailabilityTest function (fixes #2862).

This was achieved by not using TestPackageAvailability anymore, but rather
IsPackageMarkedForLoading. The main difference to the latter now is this:
We now record whether a package fully completed loading (in particular, we
record whether its init.g and read.g executed without an error). This
information is then used by IsPackageLoaded after
IsPackageMarkedForLoading returned true, to determine the final result.

I would suggest backporting this to GAP 4.10.

First off, it now aborts immediately if the package is not loaded, and
doesn't call the package's `AvailabilityTest` function (fixes gap-system#2862).

This was achieved by not using `TestPackageAvailability` anymore, but rather
`IsPackageMarkedForLoading`. The main difference to the latter now is this:
We now record whether a package fully completed loading (in particular, we
record whether its `init.g` and `read.g` executed without an error). This
information is then used by `IsPackageLoaded` after
`IsPackageMarkedForLoading` returned `true`, to determine the final result.
@fingolfin fingolfin added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements backport-to-4.10 labels Sep 27, 2018
@fingolfin fingolfin added topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker) topic: library labels Sep 27, 2018
@fingolfin fingolfin merged commit dbbe2b2 into gap-system:master Sep 28, 2018
@fingolfin fingolfin deleted the mh/IsPackageLoaded branch September 28, 2018 14:03
@fingolfin
Copy link
Member Author

Backported to stable-4.10 as c94a364

@fingolfin fingolfin added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-4.10-DONE 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.

Change IsPackageLoaded to not run the inforec.AvailabilityTest function
3 participants