It seems that by default, if some recent version of Links is both installed using OPAM and also built using a checked-out repository clone, the various paths assume values like the following:
Thus, some (like db_driver_path and prelude) look in the current checked-out repository while the others look in the currently installed OPAM package for links. This means that changes to jslib.js, stdlib, or the default configuration won't be visible until they are published in a new OPAM package which is then installed (unless one manually copies things over which is not ideal since it could break the current links repository install). This is noticeable for example with the significant changes to jslib done recently in #1110.
It might be a good idea to rationalize these choices. For example I guess the jslibdir and stdlib_path variables are getting set by the config file in the OPAM install, but why are we using that by default? On the other hand, if I make my own config file and just don't set the jslibdir and stdlib_path settings, then these default to:
It seems that by default, if some recent version of Links is both installed using OPAM and also built using a checked-out repository clone, the various paths assume values like the following:
Thus, some (like
db_driver_path
andprelude
) look in the current checked-out repository while the others look in the currently installed OPAM package for links. This means that changes to jslib.js, stdlib, or the default configuration won't be visible until they are published in a new OPAM package which is then installed (unless one manually copies things over which is not ideal since it could break the current links repository install). This is noticeable for example with the significant changes to jslib done recently in #1110.It might be a good idea to rationalize these choices. For example I guess the jslibdir and stdlib_path variables are getting set by the config file in the OPAM install, but why are we using that by default? On the other hand, if I make my own config file and just don't set the jslibdir and stdlib_path settings, then these default to:
i.e. stdlib_path gets set to something sensible but jslibdir is empty, and I have to manually set it to the right thing.
It would be good to rationalize this somehow, for example either
jslibdir
default to the right thing if it is not set by whatever config file is usedI don't have strong feelings, option 2 seems like less work.