Closed Kuroneer closed 5 years ago
Thanks, this looks like it is likely good. But I'm surprised we building up a code path like this finding each individual app instead of just using the entire lib dir... I guess to keep exact version of apps in the path in case multiple releases are installed.
Actually, maybe the boot script should be responsible for this. I'll get this merged this weekend whether I figure out this code path/boot script stuff or not.
I don't know if it's better to maintain the start_clean or create another boot file for the console_clean command.
If you're keen to set up a different boot file, how about something like WIP snippet? I think this would make the relx_get_code_paths
unneeded (and I'd need to test a little if none
is enough or it would be better to use load
and what happens with IncApps in either case)
Yup, that is what I did. But had given up because none still loads the code and we do not want that to happen, it would mean being unable to bring up the clean console if a NIF was broken for instance since they use on_load
. But Jose pointed out this morning that it works in interactive mode. So I'm modifying my patch to also update the start script to set code loading mode to interactive and then this works :).
Great! I'll close this PR and comment on the other. Thanks a lot!
When starting the release with console_clean, the applications are assumed to be in ROOTDIR/lib, and this may not be the case with applications included from the ERTS if the ERTS itself is not included.
This PR makes console_clean check the ERTS_LIB_DIR for the included applications too to add their paths to the code server.