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

Tag 0.3? #59

Closed
chenx97 opened this issue Sep 14, 2023 · 11 comments
Closed

Tag 0.3? #59

chenx97 opened this issue Sep 14, 2023 · 11 comments

Comments

@chenx97
Copy link
Contributor

chenx97 commented Sep 14, 2023

So that I can use the new features and dependencies rn.

@eminence
Copy link
Owner

v0.3.0 is tagged and also released on crates.io

@cgwalters
Copy link
Contributor

Hi, why did this bump semver? AFAICS there weren't any API incompatible changes?

This crate is "between" some other major crates (like clap) and its main dependency of rustix. I'd like to avoid multiple copies of rustix in my dependency chain.

Having semver bumps in this crate makes it much more likely that we have multiple rustix copies.

@cgwalters
Copy link
Contributor

xref clap-rs/clap#5129

@eminence
Copy link
Owner

Hi, there is a semver bump for two reasons:

  • There is a change to MSRV (as part of the update to the latest rustix). I know that there is not really any community consensus about if MSRV changes deserve semver bumps or not (and many people think that semver bumps are not appropriate), but I personally have been annoyed when a project stops building after a cargo update due to a change in MSRV.
  • There are no API changes, but the behavior of the terminal_size() changed in a possibly subtle way: It used to only look at STDOUT, but now it looks at all three streams (STDOUT, STDERR, STDIN). For example, if your command had stdout redirected to a file, terminal_size() used to return nothing, and now it returns a size.

I realize that both of these reasons are each pretty weak reasons to bump from v0.2 to 0.3, and so if you disagree with the version bump, I can definitely understand why.

@cgwalters
Copy link
Contributor

OK thanks, that is fair. For the first one, I'm personally in the camp that msrv bumps are not semver bumps, particularly because as of nowadays you can set rust-version in your Cargo.toml and this is the appropriate way to set MSRV! There's been discussions that in the future cargo may become msrv-aware and fix that exact problem.

but the behavior of the terminal_size() changed in a possibly subtle way: I

Fair enough, this is perhaps on the line for a semver bump IMO, but I understand it.

Overall, a great thing about Rust is indeed the design of semver and being able to evolve library crates. I just feel we need to be mindful of the cost-benefit of doing so, as it necessarily implies work for downstream crate maintainers.

@eminence
Copy link
Owner

Yeah, fully understood. In some cases, it's a balancing act: Don't update semver and risk breaking downstream crates (requiring them to manually pin some dependencies), or update semver and force downstream crates to updates dependencies to reduce duplications in the crate graph.

I am very eagerly awaiting the day when cargo becomes MSRV-aware :)

@epage
Copy link

epage commented Sep 18, 2023

in the future cargo may become msrv-aware and fix that exact problem.

cargo +nightly update -Zmsrv-policy uses an MSRV-aware resolver. Its far from ideal and there is a long road to stabilization, but it helps.

@eminence
Copy link
Owner

I didn't realize cargo had an initial implementation of this. Very cool!

@epage
Copy link

epage commented Sep 18, 2023

As of 3 weeks ago. See the tracking issue for where it falls short.

cgwalters added a commit to cgwalters/terminal-size that referenced this issue Sep 18, 2023
cc eminence#59

This is the standard way to encode MSRV and in the future
may be read by more tooling.
@cgwalters
Copy link
Contributor

So then #60

cgwalters added a commit to cgwalters/terminal-size that referenced this issue Sep 18, 2023
cc eminence#59

This is the standard way to encode MSRV and in the future
may be read by more tooling.
@chenx97
Copy link
Contributor Author

chenx97 commented Sep 18, 2023

FYI, the subtle API change mentioned here made me ask for 0.3 here instead of 0.2.7.

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

No branches or pull requests

4 participants