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

Build error: No matching package synom #1

Closed
fschutt opened this issue Dec 27, 2017 · 1 comment
Closed

Build error: No matching package synom #1

fschutt opened this issue Dec 27, 2017 · 1 comment

Comments

@fschutt
Copy link
Contributor

fschutt commented Dec 27, 2017

https://github.com/alexcrichton/wasm-bindgen/blob/bef908a9b110e7ac0828a1eb391f56b25f01ec18/crates/wasm-bindgen-macro/Cargo.toml#L11

I tried following the example, but I ran into this error:

cargo +nightly build --release --target wasm32-unknown-unknown
    Updating git repository `https://github.com/alexcrichton/wasm-bindgen`
    Updating registry `https://github.com/rust-lang/crates.io-index`            
    Updating git repository `https://github.com/dtolnay/quote`
    Updating git repository `https://github.com/dtolnay/syn`                    
error: no matching package named `synom` found (required by `wasm-bindgen-macro`)
location searched: https://github.com/dtolnay/syn
version required: *

Seems like it was renamed or moved?

@fschutt
Copy link
Contributor Author

fschutt commented Dec 27, 2017

See dtolnay/syn@c5ab8c6

@fschutt fschutt mentioned this issue Dec 27, 2017
@fschutt fschutt closed this as completed Dec 27, 2017
alexcrichton pushed a commit that referenced this issue Sep 8, 2022
* Trigger warnings for unused wasm-bindgen attributes

This attempts to do something similar to #3070, but without potentially dangerous fallout from strict-mode failing on all the existing code out there.

Instead of forcing a compiler error like strict-mode does, this PR will internally generate unused variables with spans pointing to unused attributes, so that users get a relatively meaningful warning.

Here's how the result looks like on example from #2874:

```
warning: unused variable: `typescript_type`
  --> tests\headless\snippets.rs:67:28
   |
67 |     #[wasm_bindgen(getter, typescript_type = "Thing[]")]
   |                            ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_typescript_type`
   |
   = note: `#[warn(unused_variables)]` on by default
```

This is not 100% perfect - until Rust has a built-in `compile_warning!`, nothing is - but is a better status quo than the current one and can help users find problematic attributes without actually breaking their builds.

Fixes #3038.

* Guide users who used the suggested (invalid) fix (#1)

Co-authored-by: Ingvar Stepanyan <me@rreverser.com>

* Deprecate strict-macro feature; update tests

* Skip anonymous scope if there are no unused attrs

* Fix unused-attr check for reserved attribute names

* Remove defunct deprecation warning

Co-authored-by: Lukas Lihotzki <lukas@lihotzki.de>
daxpedda pushed a commit to daxpedda/wasm-bindgen that referenced this issue Sep 13, 2022
daxpedda pushed a commit to daxpedda/wasm-bindgen that referenced this issue Sep 22, 2022
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

1 participant