Closed mmomtchev closed 5 months ago
Thank you for investigating. However this is not a cmake-xpack bug, neither an xpm bug, but a use case issue, the unwanted program is there because you have a reference to a npm package that added it there.
Did you identify which node package installed that unwanted rc
?
xpm install an npm package that happens to install node_modules/.bin/rc
It is true that early xpm installed npm packages too, but recent xpm no longer installs npm packages, xpm installs only xpm packages in xpacks
and npm installs npm packages in node_modules
.
The environment used by xpm run
is pretty deterministic, and is controlled by the order of the paths, with xpacks/.bin
on top, then node_modules/.bin
then the user path.
So, if you want reproducible builds, you must be sure all your desired tools are either in xpacks
or in node_modules
; the user/system path is not a reliable location and must be avoided.
I took a look at your configuration, it is pretty complicated, with lots of npm dependencies.
If you need reproducibility, you probably have to modularise your project, for example move the native part in a separate folder, have a package.json there with the xpm configuration only and no npm dependencies, and invoke xpm run action -C folder
directly from the top CI script, not from the top npm, since the top npm run
will add the unwanted tools to your path.
https://github.com/mmomtchev/proj.js/actions/runs/8471786425/job/23212574144
The Windows build has a very sneaky problem:
I spent hours looking for the problem - do you see the
--rc
CLI option.rc.exe
is a Windows Visual Studio utility that generates manifests.xpm
install annpm
package that happens to installnode_modules/.bin/rc
which - depending on the environment - can take precedence. It does not happen when using a system-installedCMake
- there must be something with the system paths whenxpm
installs the environment.