Open ohad opened 1 month ago
Well, latest:<branch>
and fetch-latest:<branch>
in pack.toml
is a syntax for "dynamic" commits of a package, not a syntax for pack collections. latest
in pack switch
command is indeed used as the pack collection, but only during the fetching.
Am I right, that you would like to use all the newest versions of everything during pack -p fetch-latest build <whatever>
? Have you tried using pack -p HEAD build <whatever>
for that? Is this satisfactory for your expectations?
I wonder if all of this could be solved by allowing two things:
1) Specifying the pack.toml
to use as a command-line argument
2) Allowing pack.toml
files to explicitly state the parent file from which they inherit their settings
Currently, the following hierarchy is established (stuff on the left-hand side takes precedence):
command-line options <- pack.toml
in current dir <- ... pack.toml
files in parent dirs ... <- $PACK_DIR/user/pack.toml
The current state is well suited when invoking pack at the command-line when already in the correct directory, but not when calling it from other processes, where we probably don't want to have the settings from the current directory. Implementing the new behavior should not be too hard, but we should try and make it backward compatible so we don't invalidate all existing setups.
We can currently specify specific package collections using the
-p
option topack
. It would be nice to also supportlatest
andfetch-latest
as options, as we do forpack.toml
files.It might not be a huge thing to change, so even if you don't have the time to do it, feel free to sketch what needs changing and where. It might make a nice first-issue.