-
Notifications
You must be signed in to change notification settings - Fork 166
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
WIP: gap root path unification #5941
base: master
Are you sure you want to change the base?
Conversation
Replace one IS_PLIST check by a direct tnum comparison, split 2 and 3 argument variant implementation
Most arguments are handled in the first stage. In particular all that are relevant for the GC. The second stage is only for the arguments which add GAP roots paths: those involve storing strings, which can be of arbitrary size. We'd like to switch their handling from C strings to GAP strings, but that requires the memory manager to be initialized. With this patch, it *is* initialized before we parse the root paths.
fi; | ||
od; | ||
# Append the new root paths. | ||
GAPInfo.RootPaths:= Immutable( Concatenation( GAPInfo.RootPaths, |
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.
I've replaced this now with a loop that uses Add
to add each path separately. Various reasons
- the "skip paths already in the list" is more powerful if we do it after ensuring the trailing slash is there
- for HPC-GAP compatibility we may have to switch
GAPInfo.RootPaths
from a plist to an atomic list, whereAdd
is supported but notAppend
Anyway this is of course also a natural place to turn relative paths in absolute ones, call realpath
, etc. -- but that goes beyond the scope of this PR
*/ | ||
Char * SyFindGapRootFile(const Char * filename, Char * buf, size_t size) | ||
Obj SyFindGapRootFile(const Char * filename) |
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.
Unfortunately changing SyFindGapRootFile
to return a string object currently clashes with work space restoring as it is called during that when restoring loaded compiled modules (including kernel extensions)
This is not yet quite done, but the goal is to ensure that the GAP kernel and library use the same (identical, egal) plist of root paths.
This has multiple benefits:
TODO:
~
into$HOME
Note that most likely right workspaces are simply broken, but if so I know why and this will be addressed by the above.
Resolves #4675