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

zerocopy 0.6.2 is not semver compatible with 0.6.1: use zerocopy::U32; | ^^^^^^^^^^^^^ no U32 in the root #228

Closed
alamb opened this issue Aug 7, 2023 · 12 comments

Comments

@alamb
Copy link

alamb commented Aug 7, 2023

Hi, thank you for this crate.

Problem

When zerocopy 0.6.2 was released to crates.io our CI tests started failing like this:

error[E0432]: unresolved import `zerocopy::U32`
  --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/apache-avro-0.15.0/src/duration.rs:19:5
   |
19 | use zerocopy::U32;
   |     ^^^^^^^^^^^^^ no `U32` in the root
   |
help: consider importing one of these items instead
   |
19 | use digest::consts::U32;
   |     ~~~~~~~~~~~~~~~~~~~
19 | use rand::seq::index::IndexVec::U32;
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19 | use rand::seq::index::IndexVecIntoIter::U32;
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19 | use rand::seq::index::IndexVecIter::U32;
   |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     and 1 other candidate

We can fix our build by pinning to zerocopy 0.6.1

Here is the downstream ticket: apache/datafusion#7221

Note that DataFusion uses zerocopy transitively the avro crate so I can't change the use of zerocopy directly

Requested solution

If you agree that 0.6.2 is not semver compatible with 0.6.1, can you please yank the 0.6.2 crate from crates.io

@alamb
Copy link
Author

alamb commented Aug 7, 2023

It looks like the aliases were changed in #101

@alamb alamb changed the title zerocopy 0.6.2 is not semver compatible with 0.6.1 zerocopy 0.6.2 is not semver compatible with 0.6.1: use zerocopy::U32; | ^^^^^^^^^^^^^ no U32 in the root Aug 7, 2023
@alamb
Copy link
Author

alamb commented Aug 7, 2023

cc @joshlf as you seem to be the owner on crates.io

@joshlf
Copy link
Member

joshlf commented Aug 7, 2023

I've yanked 0.6.2, and I'll work on a fix that I'll publish as 0.6.3.

@alamb
Copy link
Author

alamb commented Aug 7, 2023

Thank you for your quick response @joshlf

@joshlf
Copy link
Member

joshlf commented Aug 7, 2023

Hey @alamb, it actually looks like the issue was caused by us introducing a new default feature (byteorder) and putting some existing functionality behind that feature (the pub use crate::byteorder::*; in the crate root). It looks like apache-avro version 0.15.0 depends on zerocopy with default-features = false.

I'm not sure yet how I'm going to fix this in order to release 0.6.3. One option is just to remove the byteorder feature and wait until the next major version to release it, but I'm not yet convinced that that's definitely the right move. I'll keep you updated to make sure that 0.6.3 doesn't cause any more breakage.

joshlf added a commit that referenced this issue Aug 7, 2023
This feature caused breakage in 0.6.2 (see [1] for details). This commit
removes the feature and makes the `byteorder` module present
unconditionally. This will not be ported to 0.7.0, which will contain
the `byteorder` feature.

[1] #228 (comment)
joshlf added a commit that referenced this issue Aug 7, 2023
This feature caused breakage in 0.6.2 (see [1] for details). This commit
removes the feature and makes the `byteorder` module present
unconditionally. This will not be ported to 0.7.0, which will contain
the `byteorder` feature.

[1] #228 (comment)
joshlf added a commit that referenced this issue Aug 7, 2023
This feature caused breakage in 0.6.2 (see [1] for details). This commit
removes the feature and makes the `byteorder` module present
unconditionally. This will not be ported to 0.7.0, which will contain
the `byteorder` feature.

[1] #228 (comment)
@joshlf
Copy link
Member

joshlf commented Aug 7, 2023

Hey @alamb, I've published 0.6.3-alpha. Would you be able to test to see if it causes breakage on your side before I publish it as 0.6.3?

@alamb
Copy link
Author

alamb commented Aug 8, 2023

@joshlf I will do so and report here

@alamb
Copy link
Author

alamb commented Aug 8, 2023

0.6.3-alpha (from the https://github.com/google/zerocopy/tree/v0.6.x branch) seems to compile well for our project.

I am running it through our full CI here: apache/datafusion#7227 and will report any problems it encounters

Update : All CI tests have passed, I think 0.6.3 would work well for our project. Thank you again @joshlf

joshlf added a commit that referenced this issue Aug 8, 2023
@joshlf joshlf mentioned this issue Aug 8, 2023
@joshlf
Copy link
Member

joshlf commented Aug 8, 2023

Thanks for doing that, @alamb! I'll release 0.6.3 soon (once #232 merges).

joshlf added a commit that referenced this issue Aug 8, 2023
@joshlf
Copy link
Member

joshlf commented Aug 8, 2023

Okay, it's been published!

@alamb alamb closed this as completed Aug 8, 2023
@alamb
Copy link
Author

alamb commented Aug 8, 2023

FWIW our latest CI run picked up 0.6.3 and seems to have passed successfully: https://github.com/apache/arrow-datafusion/actions/runs/5797783905/job/15714083065

Thanks again @joshlf

@joshlf
Copy link
Member

joshlf commented Aug 8, 2023

Awesome! You're very welcome!

@joshlf joshlf mentioned this issue Aug 20, 2023
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

No branches or pull requests

2 participants