rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

[unstable option] required_version

Open scampi opened this issue 6 years ago • 11 comments

Tracking issue for required_version

scampi avatar Feb 13 '19 22:02 scampi

Would it make sense for required_version to support SemVer semantics similar to Cargo dependencies? This would make it easier to use in cases where CI agents are updated automatically.

For instance, if somebody sets required_version = "1.4.36" but their CI agent is updated separately with a newer patch-release such as 1.4.37, currently their CI build would fail.

reynoldsbd avatar Mar 05 '21 20:03 reynoldsbd

Why is this not stabilized yet?

tseli0s avatar Feb 27 '23 16:02 tseli0s

Why is this not stabilized yet?

https://github.com/rust-lang/rustfmt/discussions/5365 https://github.com/rust-lang/rustfmt/discussions/5367

calebcartwright avatar Feb 27 '23 17:02 calebcartwright

There should be semver match instead of just eq, I suppose.

boozook avatar Oct 27 '23 09:10 boozook

There should be semver match instead of just eq, I suppose.

I think so too.

Awayume avatar Nov 01 '23 08:11 Awayume

There should be semver match instead of just eq, I suppose.

Hey guys, willing to help. Should I open a PR to it?

wesleymatosdev avatar Feb 08 '24 15:02 wesleymatosdev

@ologbonowiwi thanks for offering to help. Before submitting a PR could you open an issue describing what you're planning to implement. I think it might be useful to discuss the approach before jumping in and working on this.

ytmimi avatar Feb 08 '24 17:02 ytmimi

#6063 opened @ytmimi. Can you check if it makes sense?

wesleymatosdev avatar Feb 08 '24 17:02 wesleymatosdev

And regarding the conditions:

  • [ ] Is the default value correct ?
  • [ ] The design and implementation of the option are sound and clean.
  • [ ] The option is well tested, both in unit tests and, optimally, in real usage.
  • [x] There is no open bug about the option that prevents its use. (I've checked this one, no bugs open)

Which of them still needs to be worked on?

wesleymatosdev avatar Feb 08 '24 17:02 wesleymatosdev