-
Notifications
You must be signed in to change notification settings - Fork 9
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
Stabilize only part of the crate #154
Comments
Let's accept the ugly API. Adding another crate and another indefinite delay because of hypothetical features sounds awful. If you want to use GATs we can release a 2.0, and we can semver-trick 1.1 to use the error types from 2.0, which will be functionally the same as what you're proposing, without adding a bunch of complicated indefinitely-open loops to all of our workloads. |
We could set a deadline to the Debian release or some offset after (1mo?)
Oh, maybe yes! It needs to impl the old trait in terms of the new one but I think it's doable. I'd definitely want to try it out before committing into that approach though. |
Or a different possibility: have |
Let me stew on this. It's an interesting general approach to "1.0" stuff that need a higher MSRV than our actual MSRV on 1.0-day. Or conversely, a way to artificially lower our MSRV by removing things that aren't doable with old rustcs. In this particular case I'm a little skeptical, but I don't know the details of what you want to do with |
Basically, the error types are our blocker and it's better to have a trait with BTW one other place we need GAT is |
At first when I read this I nearly cry'ed but after sitting with it all day its actually not a bad idea. I did #161 to demo it. Note that the changes to add constructors to all the error types will need thinking out better. I just hacked it up real quick to see how it works. |
I think if we simply make the unstable crate reexport the stable one then we can simply switch the dependency to be on the unstable crate and it should continue working. |
I think this might be exactly the same as the semver trick. Can't we do exactly this but with "the stable crate" being hex-conservative 1.0 and "the unstable crate" being hex-conservative 0.4? |
It's not quite the semver trick -- it's a sorta inverted version of it. But basically:
|
Yes! I wanted to suggest it too but held off for a reason I don't remember. I was probably thinking that you'll both prefer not to do two crates thing. It's even better than semver trick because since we're going to break the API anyway and thus make a breaking SemVer bump, the weird edge cases around semver trick are not possible. One thing I'm not sure about is how will we develop it in a single repository. |
We should have a separate branch for 1.0. When we eventually fold the 0.x series into the 1.0 branch we might need to do some illicit git-fu (e.g. synthetically creating a merge commit between 1.0 and When PR'ing into 1.0 those PRs will then look different (at least when we notice the target branch) which is good because we need to be more careful. In fact we could make Github enforce a 2-ack policy on exactly those commits. |
I meant using |
Yeah, doing this in But here we don't even need to think about that much. |
|
For a while I felt uneasy about stabilizing the whole crate. It takes from our time to stabilize more urgent things like
units
andprimitives
and the only types we know for sure we need are the errors. Up until this point I have tolerated it thinking it would resolve easily. However I remembered I wantedDisplayHex
to have GAT.Our options are:
I find the first three options highly annoying, which leaves us with the last one which also has its other advantages - relieving pressure to work on hex too much.
I suggest moving everything except decoding to
hex-conservative-unstable
crate, which will reexport everything such that it'd become a drop-in replacement for thehex-conservative
crate (people will usually only need to change name inCargo.toml
and it should work for most code). Then we can stabilizehex-conservative
pretty much immediately (but practically, I'd wait until we actually have something that depends on it close to stabilization). Then shift our focus onunits
andprimitives
.The text was updated successfully, but these errors were encountered: