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

Having ra_ap_syntax as dependency fails since 0.0.43 #8438

Closed
drahnr opened this issue Apr 9, 2021 · 6 comments
Closed

Having ra_ap_syntax as dependency fails since 0.0.43 #8438

drahnr opened this issue Apr 9, 2021 · 6 comments

Comments

@drahnr
Copy link
Contributor

drahnr commented Apr 9, 2021

Developing cargo-spellcheck which utilizes ra_ap_syntax, the compilation fails with anything after 0.0.42.

...
   Compiling ra_ap_profile v0.0.43
   Compiling ra_ap_syntax v0.0.43
error[E0308]: mismatched types
   --> /home/.cargo/registry/src/github.com-1ecc6299db9ec823/ra_ap_syntax-0.0.43/src/algo.rs:570:52
    |
570 |         NodeOrToken::Node(it) => NodeOrToken::Node(it.green()),
    |                                                    ^^^^^^^^^^ expected struct `GreenNode`, found enum `Cow`
    |
    = note: expected struct `GreenNode`
                 found enum `Cow<'_, GreenNodeData>`

error[E0308]: mismatched types
   --> /home/.cargo/registry/src/github.com-1ecc6299db9ec823/ra_ap_syntax-0.0.43/src/ast/make.rs:535:26
    |
535 |     SyntaxNode::new_root(n.green())
    |                          ^^^^^^^^^ expected struct `GreenNode`, found enum `Cow`
    |
    = note: expected struct `GreenNode`
                 found enum `Cow<'_, GreenNodeData>`

error: aborting due to 2 previous errors

The last working version is 0.0.42

@drahnr
Copy link
Contributor Author

drahnr commented Apr 9, 2021

   Compiling ra_ap_syntax v0.0.45
   Compiling cargo-spellcheck v0.8.0-alpha.0 (/projects/cargo-spellcheck)
error[E0308]: mismatched types
   --> /home/.cargo/registry/src/github.com-1ecc6299db9ec823/ra_ap_syntax-0.0.45/src/algo.rs:570:52
    |
570 |         NodeOrToken::Node(it) => NodeOrToken::Node(it.green()),
    |                                                    ^^^^^^^^^^ expected struct `GreenNode`, found enum `Cow`
    |
    = note: expected struct `GreenNode`
                 found enum `Cow<'_, GreenNodeData>`

error[E0308]: mismatched types
   --> /home/.cargo/registry/src/github.com-1ecc6299db9ec823/ra_ap_syntax-0.0.45/src/ast/make.rs:535:26
    |
535 |     SyntaxNode::new_root(n.green())
    |                          ^^^^^^^^^ expected struct `GreenNode`, found enum `Cow`
    |
    = note: expected struct `GreenNode`
                 found enum `Cow<'_, GreenNodeData>`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
sccache: Compiler killed by signal 1
error: could not compile `ra_ap_syntax`

@drahnr drahnr changed the title Having ra_ap_syntax as dependency fails since 0.43+ Having ra_ap_syntax as dependency fails since 0.0.43 Apr 9, 2021
@bjorn3
Copy link
Member

bjorn3 commented Apr 9, 2021

Which version of rowan does Cargo.lock state?

@drahnr
Copy link
Contributor Author

drahnr commented Apr 9, 2021

[[package]]
name = "rowan"
version = "0.13.0-pre.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a5fc82ed0b7e7fba157331f0d8f64abd73bced6e7ac2a4dfa0c4cf0ab584e8"
dependencies = [
 "countme",
 "hashbrown",
 "memoffset",
 "rustc-hash",
 "text-size",
]

@bjorn3
Copy link
Member

bjorn3 commented Apr 9, 2021

Rust-analyzer's Cargo.lock states version 0.13.0-pre.3. Maybe there was a breaking change? Try downgrading to this version. For example by editing the version field and removing the checksum field.

@drahnr
Copy link
Contributor Author

drahnr commented Apr 9, 2021

That works :)

drahnr added a commit to drahnr/cargo-spellcheck that referenced this issue Apr 19, 2021
@lnicola
Copy link
Member

lnicola commented Sep 12, 2021

rowan 0.13 is out, I don't think there's anything left to do here.

@lnicola lnicola closed this as completed Sep 12, 2021
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

3 participants