-
Notifications
You must be signed in to change notification settings - Fork 160
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
Reorder methods after new implications are added #2773
Conversation
7d7dcd8
to
ea8f7d8
Compare
Codecov Report
@@ Coverage Diff @@
## master #2773 +/- ##
=========================================
Coverage ? 75.92%
=========================================
Files ? 481
Lines ? 241925
Branches ? 0
=========================================
Hits ? 183679
Misses ? 58246
Partials ? 0
|
fa00be9
to
44a8458
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine, except for two very minor comments concerning the documentation
44a8458
to
01f8b25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more comment about a formulation, sorry that I did not spot this earlier
Many GAP methods get rank adjustments based on the rank of some filter, e.g, `RankFilter(IsAbelian)`. However, these ranks may change when new implications are added, e.g. when certain packages are loaded. But those method rank adjustments then won't be updated, which can ultimately lead to the effect that loading a package changes which methods get executed in otherwise identical code. This PR helps avoid that, by making it possible to set "dynamic" rank adjustments which get updated as new implications are added. Some cleverness is needed to make this work efficiently when loading packages. - Record rank adjustment in METHODS_OPERATION - Add RECALCULATE_ALL_METHOD_RANKS function which does what it says. - Adjust MethodsOperation to include base rank - Increase size of HIDDEN_IMPS_CACHE and WITH_IMPS_CACHE to speed up RECALCULATE_ALL_METHOD_RANKS() - Make sure RANK_FILTERS is always set promptly, then remove the test for it being unset in RankFilter - Automatically reorder methods after library or package loading, or InstallTrueMethod - Use COPY_LIST_ENTRIES in method installation to avoid making an intermediate list - Support passing a function of no arguments as the rank adjustment to InstallMethod - Reset reordering status on quit from break loop. Fixes gap-system#2513
01f8b25
to
17d1bac
Compare
... to use a rank *function* instead of a single fixed rank value.
No problem, thanks for carefully reading! I removed the comma. In addition, I added a commit which converts a bunch of A similar thing likely should be done in pacakges... Now it would be really good if @stevelinton could comment how he'd like to proceed... |
I'm happy with this. The older PR kept getting test failures which, I think, were actually not caused by the PR but by test infrastructure glitches. Otherwise I'd have merged it. |
This has passed all tests and been extensively reviewed. Time to merge. |
This is rebased and cleaned up version of #2521; I removed many whitespace-only changes, reformatted a few things and otherwise squashed most changes into a single commit.
Closes #2521
Fixes #2513