Stop wrapping Julia modules in special objects #1049
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This resolves issues with outdated caches in our module wrappers.
We added these wrappers to serve as a cache. But we already exempted Julia functions from this. For which we create wrapper objects -- so arguably the cache would make most sense for them... But this can cause inconsistencies, hence @ThomasBreuer remove this in PR #423 four years ago.
So the only thing we cached were the wrapper objects for Julia modules. And the only reasons we needed those wrappers were ...
Julia.GAP
as a way to access theGAP
Julia module,This PR achieves all of the above by adjusting the GAP type for Julia object slightly, we now indicate whether we are seeing a Julia module by setting a suitable filter. As an added bonus, this now also works with modules access by any other means, e.g. returned by a
JuliaEvalString
or a Julia function.The part I like least is the new hack to make
Julia.GAP
possible. A long-term alternative to this might be to provide a different clean way to access this -- e.g. perhaps we should provide a global GAP variableGAP_jl
which contains the GAP module? (We could also just call itGAP
but I feel this might be reeeaaally confusing to GAP users, so I'd rather not). For symmetry in Oscar we could also addOscar_jl
as an alias for theOscar
global.But all of that is beyond this PR. We could file it as a separate issue if care enough.
Resolves #1044
Closes #1045