fingolfin / gap

GAP - Groups, Algorithms, Programming - a System for Computational Discrete Algebra
http://www.gap-system.org
GNU General Public License v2.0
0 stars 0 forks source link

Better handling of (default) root paths #78

Closed fingolfin closed 1 year ago

fingolfin commented 7 years ago

The following is related to issues #30 and #65 and also important for libgap / sageinterface (see PR #64).

Currently, the only two ways to modify the list of default GAP root paths are by #defining SYS_DEFAULT_PATHS are compile time, or passing -l on the command line. And the latter is somewhat awkward for libgap (it is possible right now of course, but a "proper" API should not force you to encode settings into command line flags which then have to be parsed again.

So we should expose SySetGapRootPath through the libgap API; not necessarily directly, but there should be some way to tweak the list of root paths. That should also include resetting the list.

Also, InitSystem is right now setting various default root paths:

#if SYS_IS_CYGWIN32
    SySetGapRootPath( SyWindowsPath );
#elif defined(SYS_DEFAULT_PATHS)
    SySetGapRootPath( SYS_DEFAULT_PATHS );
#else
    SySetGapRootPath( "./" );
#endif
...
          SySetGapRootPath(DotGapPath);

For a library, you may not want this, so this should either be optional (i.e. provide an init function for the library which doesn't do these things at all), or at least it should be possible to reset the list of root paths afterwards.

There are more things to be done and said here, we can add them on this issue as we go on.