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

New project: rspc = {version = "1.0.0-rc.5"} specta = {version = "2.0.0-rc.1"} will automatically install "specta-macros"@2.0.0-rc.6, which results in a breaking change #173

Closed
greatcat19 opened this issue Nov 13, 2023 · 2 comments

Comments

@greatcat19
Copy link

The lock file would be like

[[package]]
name = "specta-macros"
version = "2.0.0-rc.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14363e2a9ff7d07fdf6a138a8637ba980da8144b181536ed0f3b445a5f02f949"
dependencies = [
 "Inflector",
 "proc-macro2",
 "quote",
 "syn 1.0.109",
]

instead of

[[package]]
name = "specta-macros"
version = "2.0.0-rc.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd0de71d47f9076754480433ca4fdcbde756312b56e7991ac17f2cb2435897ed"
dependencies = [
 "Inflector",
 "itertools",
 "proc-macro2",
 "quote",
 "syn 1.0.109",
 "termcolor",
]

Thus, there will be a compilation error:

error: specta: expected path. Eg. `String` or `std::string::String`
   --> /Users/$USER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/specta-2.0.0-rc.1/src/type/impls.rs:193:19
    |
193 | #[specta(remote = "SystemTime", crate = "crate", export = false)]
    |                   ^^^^^^^^^^^^

error: specta: expected path. Eg. `String` or `std::string::String`
   --> /Users/$USER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/specta-2.0.0-rc.1/src/type/impls.rs:201:19
    |
201 | #[specta(remote = "Duration", crate = "crate", export = false)]
    |                   ^^^^^^^^^^

error[E0432]: unresolved import `specta_macros::RSPCType`
   --> /Users/$USER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/specta-2.0.0-rc.1/src/lib.rs:112:9
    |
112 | pub use specta_macros::RSPCType;
    |         ^^^^^^^^^^^^^^^^^^^^^^^ no `RSPCType` in the root

   Compiling hyper v0.14.27
   Compiling dirs v5.0.1

We might need rc6 for rspc?

@oscartbeaumont oscartbeaumont transferred this issue from oscartbeaumont/rspc Nov 14, 2023
@oscartbeaumont
Copy link
Owner

Whoops, my bad. Transfering this to the Specta repo as it's not an rspc bug.

I did not correctly fix the version of specta-macros in the specta package. Will ensure that is fixed for future releases. You should be able to add specta-macros = { version = "=2.0.0-rc.1" } to your Cargo.toml as a workaround.

@greatcat19
Copy link
Author

@oscartbeaumont thank you!

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