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

Specta is broken for main branch #414

Closed
Ziothh opened this issue Nov 20, 2023 · 1 comment
Closed

Specta is broken for main branch #414

Ziothh opened this issue Nov 20, 2023 · 1 comment

Comments

@Ziothh
Copy link
Contributor

Ziothh commented Nov 20, 2023

#405 allows me to use pcr-cli on NixOS but only on main.
Because I have to use the main branch I can't use anything related to specta (v2.0.0-rc.1 does not compile).

I fixed that locally by cloning both rspc and pcr and bumping specta to v2.0.0-rc.6.
Now I'm left with this error:

$ cargo prisma generate
# ... Snip
error: specta: expected path. Eg. `String` or `std::string::String`
 --> prisma/src/prisma.rs:3:25685
  |
3 | ...ecta (rename = "User" , crate = "prisma_client_rust::specta")] pub struct Data { # [serde (r...
  |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: specta: expected path. Eg. `String` or `std::string::String`
 --> prisma/src/prisma.rs:3:56238
  |
3 | ...ecta (rename = "Todo" , crate = "prisma_client_rust::specta")] pub struct Data { # [serde (r...
  |
# ... Snip

It seems like the interface for #[specta(...)] has changed.
(Line in pcr that uses that macro: /crates/generator-macros/src/partial_unchecked.rs:73)

I tried to fix the reason for this error, but failed. Macros still are magic to me.

@oscartbeaumont
Copy link
Collaborator

I suspect this one is my bad and related to my incorrect locking of the version of specta-macros. specta-rs/specta#173

You could probally try the spacedrive-rspc-v1 for an updated Specta or alternatively add specta-macros = { version = "=2.0.0-rc.1" } into your Cargo.toml temporarily.

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