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

fix: bump paperclip-macros minor #546

Merged
merged 1 commit into from
Oct 13, 2024
Merged

fix: bump paperclip-macros minor #546

merged 1 commit into from
Oct 13, 2024

Conversation

tiagolobocastro
Copy link
Collaborator

This is to address min/max being added and breaking back compat. paperclip-macros 0.6.4 and 0.6.5 will be yanked from crates. paperclip 0.9.0 and 0.9.1 will also be yanked from crates.

Resolves #542

@tiagolobocastro
Copy link
Collaborator Author

@Sufflope
I think we also yank paperclip 0.9.0 and 0.9.1 unfortunately, because those need the min/max change.
So once the paperclip-macros 0.6.{4,5} is yanked then paperclip 0.9.{0,1} become broken anyway?
Is this the right thing to do?
CC
@formlogic-kirk @snaggen @RaulTrombin @thomedw
for visibility since you've raised PRs recently, see #542 for the problem we're trying to address here, sorry for the mess-up :(

@tiagolobocastro
Copy link
Collaborator Author

tiagolobocastro commented Oct 5, 2024

I wonder if another way is to release 0.6.6 without min/max
Then pre 0.9.0 would get the correct code when updating, and existing 0.9.{0,1} would stay working (without updating). But if 0.9{0,1} update, then they'd go to 0.9.2 anyway which would have the correct paperclip-macros 0.7.0?

@Sufflope
Copy link
Contributor

Sufflope commented Oct 6, 2024

First let me say that I don't have previous experience with yanking, sorry (it's not a brag "I don't break things" 😅 on the contrary, it's just that I never got to maintain a public library 😢 ), so I don't have prior battle-tested knowledge.

So my not-so-educated opinion is: the problem with your second approach is in the (contrived, admittedly, but technically possible) case where someone would have pinned a =0.9.0 paperclip dependency but no explicit macros version, it would break on cargo update? So I think the safest option is your first one.

@tiagolobocastro
Copy link
Collaborator Author

Won't it break anyway with the first approach? Because we'd be yanking the paperclip-macros pointed to by the paperclip 0.9.{0,1}?

@Sufflope
Copy link
Contributor

Sufflope commented Oct 6, 2024

According to https://doc.rust-lang.org/cargo/commands/cargo-yank.html if I understand correctly, it should prevent new projects from adding paperclip 0.9.{0,1} as dependencies, but projects which have them already should continue compiling (with a warning telling them those deps are yanked). But at least users would be warned, and be able to update by switching to at least 0.9.2, instead of updating only the macro and getting a cryptic error that some fields are missing in a proc-macro. At least that's my understanding.

@Sufflope
Copy link
Contributor

Sufflope commented Oct 6, 2024

Note that anyway on my side I updated all my internal projects to 0.9 and I generate min/max attributes, and I am quite aware of the problem we're discussing, so even if there's a subsequent problem with the chosen strategy, it won't be a big issue to me, so feel free to choose the strategy you think will work the best!

@formlogic-kirk
Copy link
Contributor

Looks good to me 👍

@tiagolobocastro
Copy link
Collaborator Author

Alright cool, I'll try and do this tomorrow or over the weekend, thanks both

This is to address min/max being added and breaking back compat.
paperclip-macros 0.6.4 and 0.6.5 will be yanked from crates.
paperclip 0.9.0 and 0.9.1 will also be yanked from crates.

Signed-off-by: Tiago Castro <[email protected]>
@tiagolobocastro tiagolobocastro merged commit 5489361 into master Oct 13, 2024
7 checks passed
@tiagolobocastro tiagolobocastro deleted the fix-breaking branch October 13, 2024 15:43
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

Successfully merging this pull request may close these issues.

paperclip-macros patch version 0.6.4 introduced a breaking change with min/max
3 participants