Closed kpreid closed 1 year ago
Ah yeah I had once theory-crafted that this proc-macro pattern should be using =
constraints.
0.2.0
release (henceforth using =
constraints for the double-crate pattern)0.1.4
;0.1.5
release which reverts back to 0.1.3
("polite yanking").This would break the new 0.1.4
users without a .lock
file.
0.1.0 .. 0.1.4
.This breaks the low MSRV users without a lock file.
@kpreid what do you think?
This shouldn't break anyone: Option 1 but you make a macro_rules_attribute 0.1.5
release which depends on macro_rules_attribute-proc_macro 0.2.0
.
More generally: =
dependencies are not necessary (though they may be convenient) if you instead allow the proc-macro crate to have separate major versioning.
Ah, very nice idea. Done that for 0.1.5
, but I've also released 0.2.0
, since I find it simpler to keep both versions being bumped in lockstep. Thanks for the report and the idea!
Create this source file:
Create this
Cargo.toml
dependency:Then modify the lockfile using either
cargo +nightly update -Z direct-minimal-versions
orcargo update --precise 0.1.0 -p macro_rules_attribute
.Compilation will then fail with the error:
This does not happen if
macro_rules_attribute-proc_macro
is at 0.1.3 or lower. So, the newmacro_rules_attribute-proc_macro 0.1.4
breaks its dependentmacro_rules_attribute 0.1.0
.