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 ] Support global (configurational) pack.toml outside the $PACK_DIR #321

Open
buzden opened this issue Jan 27, 2025 · 2 comments
Open
Labels
feature request Request for new functionality

Comments

@buzden
Copy link
Collaborator

buzden commented Jan 27, 2025

Related to #316 and chez update problems (which is now may be a common case, since chez 10.1 is released).

When for some reason, e.g. because of updating Chez, we need to reinstall pack, it's easy to forget to backup $PACK_DIR/user/pack.toml file before removing the pack dir. It would be handy if configuration would be stored separately, e.g. in $XDG_CONFIG_HOME/pack/pack.toml or in $HOME/.config/pack/pack.toml or somewhere else.

Having this, we even can suggest running reinstallation script when pack is cannot be run due to version incompatibility.

Implementationally, we can even join $PACK_DIR/user/pack.toml and $XDG_CONFIG_HOME/pack/pack.toml when loading configs, and thus code for storing the current selected collection won't be changed, and everything still will work when no external config is present, or when $XDG_CONFIG_HOME is unwritable.

@buzden buzden added the feature request Request for new functionality label Jan 27, 2025
@buzden
Copy link
Collaborator Author

buzden commented Jan 27, 2025

As a variant (maybe, the simplest one?) we can treat proposed pack.toml from $XDG_CONFIG_HOME or $HOME as just another local pack.toml, the very outmost one. It won't change any logic of the global pack.toml file, while, as far as I can see, still solving the original problem.

@stefan-hoeck
Copy link
Owner

I'm open for simple variants currently. Nothing fancy. And it must be backwards compatible. So I suggest to

  • look in $XDG_CONFIG_HOME/pack/pack.toml for the root pack.toml file
  • loock in $PADK_DIR/user/pack.toml for settings that might override the ones from $XDG_CONFIG_HOME but are deprecated (a corresponding warning should be issued)

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

2 participants