Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] support latest switch for option -p #296

Open
ohad opened this issue Jul 22, 2024 · 2 comments
Open

[feature request] support latest switch for option -p #296

ohad opened this issue Jul 22, 2024 · 2 comments
Labels
feature request Request for new functionality

Comments

@ohad
Copy link

ohad commented Jul 22, 2024

We can currently specify specific package collections using the -p option to pack.
It would be nice to also support latest and fetch-latest as options, as we do for pack.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.

@buzden buzden added the feature request Request for new functionality label Jul 29, 2024
@buzden
Copy link
Collaborator

buzden commented Jul 29, 2024

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?

@stefan-hoeck
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for new functionality
Projects
None yet
Development

No branches or pull requests

3 participants