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

[nextest-runner] add option hide-progress-bar to configuration file #1348

Closed

Conversation

joshleaves
Copy link

While configuring nextest for my own projects, I noticed that I couldn't control display of the progress bar from the .config/nextest.toml file and I would have to manually run the command with --hide-progress-bar every time, which didn't feel very intuitive.

This commit is here to fix this.

Copy link

codecov bot commented Mar 2, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 77.94%. Comparing base (fb778ed) to head (b170fdd).

Files Patch % Lines
cargo-nextest/src/dispatch.rs 66.66% 1 Missing ⚠️
nextest-runner/src/reporter.rs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1348      +/-   ##
==========================================
+ Coverage   77.93%   77.94%   +0.01%     
==========================================
  Files          74       74              
  Lines       17777    17790      +13     
==========================================
+ Hits        13854    13867      +13     
  Misses       3923     3923              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sunshowers
Copy link
Member

Thanks!

I don't think repository config is the right place for this -- this is pretty dependent on individual user preferences.

As documented here, there's a NEXTEST_HIDE_PROGRESS_BAR environment variable which you can set to 1 to hide the progress bar. Hope that helps!

I'd like to add user-specific configuration at some point, but that does require some design work still.

@joshleaves
Copy link
Author

Oh right, never saw it that way. Thanks :)

Side note: I just tested and the environment variable should be set to true, not 1. The documentation needs to be updated to reflect that.

For user-specific configuration, how about always reading from $HOME/.nextest.toml to read for properties that shouldn't be in repository config??

@sunshowers
Copy link
Member

sunshowers commented Apr 1, 2024

Side note: I just tested and the environment variable should be set to true, not 1. The documentation needs to be updated to reflect that.

Hmmmm, I don't like that -- for environment variables 1 should always be treated the same as true. We should be using BoolishValueParser if possible.

For user-specific configuration, how about always reading from $HOME/.nextest.toml to read for properties that shouldn't be in repository config??

This is a matter of some controversy! Some folks like using the XDG directories, others want to put their configs in HOME. We'll have to do a survey of what's supported and what precedence order to use.

@sunshowers
Copy link
Member

I've fixed the NEXTEST_HIDE_PROGRESS_BAR issue in 7aabada, thanks for flagging it! Once this is released, both true and 1 should work great.

@sunshowers
Copy link
Member

(And I've filed #1419 for user-specific config.)

Thanks again for submitting the PR -- I'll close it now in favor of the above followups.

@sunshowers sunshowers closed this Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants