-
Notifications
You must be signed in to change notification settings - Fork 152
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
structopt-derive 0.3.6 breaks structopt <=0.3.5 #315
Comments
|
I propose the following steps to mitigate this issue:
What do you think? |
It will be a lot of work. Why having structopt 0.4? as it add nothing, simpler to just update structopt-derive to 0.4 and using strict version dependency. |
You are right. Any other concerns? |
Why not release 0.4 to add the function to the StructOpt trait? I don't understand the reason against 0.4. |
What function are you talking about? |
0.4 will be used only if you decide to upgrade. The modifications are not a breaking change, it will only panic if the structopt traits are manually implemented (but this rely on implementing undocumented internals, thus not guaranteed to work). |
Please note that this issue is not about the Actually, it has been fucked for years and just happened to work because nobody have made attempt to radically rework the internal machinery. Now, when we tried to extend our trait with internal methods, it went sought.
Let's imagine someone has a strict dependency on Bingo! The code generated by The proposed solution here is to release the next Everything's works, everybody's happy, angels sing, and a light suddenly fills the room. |
structopt-derive v0.3.6
relies on internal details ofstructopt v0.3.6
. However, older versions ofstructopt
thanv0.3.6
have their dependencies set up so that they can depend onstructopt-derive v0.3.6
. This leads to a compilation failure after someone who has a dependency such asstructopt = "=0.3.5"
runscargo update
.Steps to reproduce
foo
(cargo new --lib foo
)foo/Cargo.toml
to includefoo/src/lib.rs
to includecargo check
Possible solution
structopt-derive v0.3.6
andstructopt v0.3.6
structopt-derive v 0.4.0
and release an equivalentstructopt v0.3.7
that depends on this new minor version ofstructopt-derive
Future mitigation
Only release versions of
structopt
that have an=
dependency onstructopt-derive
. For example ifstructopt v0.3.5
had been released with the dependencystructopt-derive = "=0.3.5"
then it wouldn't have been susceptible to this breakage.The text was updated successfully, but these errors were encountered: