Closed tomeichlersmith closed 6 days ago
ldmx be an alias for just.
and that's something we can do when sourcing the environment, right? I think this will make it almost transparent to most users.
Also can you add the compile
and the recompFire
commands to your justfile, please?
can you add the compile and the recompFire commands to your justfile, please?
Just did :+1: https://github.com/LDMX-Software/ldmx-sw/commit/d084d1e2a43c354e64608a074da998142dc18687
we can do when sourcing the environment, right?
yes, I think the ldmx-env.sh
would evolve into only alias ldmx=just
after some time allowing for folks to transition. I could add a check for denv
and just
to the header of ldmx-env.sh
and then if they both pass, we would alias ldmx=just
and if they don't there would be a warning.
Just did
thanks, but recompFire
only does fire
like this now, no?
I could add a check for
yeah I think that sounds good!
It calls the fire task which calls the build task as a dependency so both build and fire will be run.
I may want to rewrite this if I find while testing that recompiling before firing every time is too onerous.
just
lists the possible recipes and a help message
argv[0]
within a justfile so I can have the help message conform to the user's choice of just
or ldmx
?
just check
fails if denv
is not foundjust check
passes if denv
is found and it finds a container runner
just configure
passes argments to cmake
and calls it appropriatelyjust build
defaults to building with all cores, can set number of cores with integer e.g. just build 2
just init
successfully creates a denv on computer that passes just check
just init
fails helpfully if specific parts are not available
just fire
runs a config from the ldmx-sw directory[no-cd]
attribute), need to use just -f path/to/ldmx-sw/justfile fire config.py
so its probably easier to use denv
for this part but c'est la vie
/etc/containers/registries.conf.d/shortnames.conf
, or add docker.io
to unqualified-search-registries
in /etc/containers/registries.conf
for podman to find DockerHub images. Not a big issue since most folks won't use podman but would be nice to point out. (I chose the last option so the justfile can remain unchanged)confirm(PROMPT)
attribute for clean
.
confirm(PROMPT)
attribute since then we'd drop to 1.9 which is available on many package managers; however, the pre-built binaries are already very cross platform and would have the user installing 1.32 or newer.New screenshot with updates. Want to look into deducing argv[0]
so the help message can have ldmx
or just
depending on user's choice. Not sure if that is possible though.
More thoughts while on the train, mostly in regards to environment variables we can define in the justfile
to apply to all the recipes it runs.
LDMX_BASE
to something helpful?APPTAINER_CACHEDIR
environment variable to something helpful?
:stop_sign: Will Not :stop_sign:
from-ldmx-env
recipe. Thought about it, but denv
pretty much requires the ldmx/dev image to be one of the newest available and other updates to ldmx-sw deprecate non-v4 images, so encouraging updating is a good way to go.
After I started looking into adopting
denv
within ldmx-sw I realized that I was just writing custom shell scripts to run various common commands that ldmx-sw developers run. In the software biz, this is called "task running" and there are a plethora of solutions already available. After some browsing, I can across the task runnerjust
which I find to be beneficial for a few reasons:just <task>
e.g.just build
On the branch associated with this issue, I've included a justfile that I haven't thoroughly tested but shows what I'm imagining could be used. The terminal output of running
just
without any arguments (and the default task beingjust --list
) gives the help message.I also want to include an image of this because it is :sparkles: pretty :sparkles:
In the SW Dev Meeting where I first brought up
just
, the request was made to include the possibility of still haveldmx
be the root command. I also like this and so the solution I'm imagining is to simply haveldmx
be an alias forjust
.Related Discussions for Background