Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow user-specific configuration #1419

Open
10 tasks
sunshowers opened this issue Apr 5, 2024 · 3 comments
Open
10 tasks

Allow user-specific configuration #1419

sunshowers opened this issue Apr 5, 2024 · 3 comments

Comments

@sunshowers
Copy link
Member

Originally came up in #1348 -- at some point we'll likely need to grow a way to do user-specific configuration, not just repository-specific configuration.

Some considerations:

  • Location of config
    • XDG everywhere? What about Windows? https://docs.rs/etcetera can help.
    • Allow config directly in home dir as a fallback?
    • Look at what jj and atuin do
  • Which options should we let users set?
  • What if repository and user configs clash?
    • Probably want repository config to generally override user config, but also let users say they want to override repository config
    • Current method uses environment variables, which always override repository config!
@adam-gaia
Copy link

I'm interested in this!

For anyone else who stumbles upon this in the meantime, it's pretty easy to use boxxy to fake a global config.

$ boxxy --rule "<repo>/.config/nextest.toml:<user_config_dir>/nextest.toml:file" cargo nextest run

I've written a little wrapper script here: https://github.com/adam-gaia/cargo-nextest-xdg

@sunshowers
Copy link
Member Author

Thank you! Could you tell me what config you wanted to set at the user level?

@adam-gaia
Copy link

I like to set failure-output="final". I have a handful of rust repositories where I use nextest and would like to have the same output style for consistency.

It feels awkward to me to force my style preferences on other contributors - not that I have any contributors for my small side projects :)

To be fair, I could gitignore .config/nextest.toml. Regardless, I like the idea of user-level configuration so that nextest behaves the same in any random repo I work with (unless there is a specific reason for a repo to have its own nextest.toml).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants