Open eggyal opened 1 year ago
For context, the installation currently fails with:
$ cargo install ts-bindgen
[...]
Compiling swc_common v0.14.7
error[E0308]: mismatched types
--> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/swc_common-0.14.7/src/syntax_pos.rs:92:9
|
92 | &FOO
| ^^^^ expected `*const ()`, found `usize`
|
= note: expected reference `&'static LocalKey<Cell<*const ()>>`
found reference `&LocalKey<Cell<usize>>`
Thanks! I will work on getting thsi fixed soon. I really appreciate the detailed report.
Just an FYI that this won't be fixed upstream as swc had been using an unstable/internal public API of the scoped-tls crate who do not consider their update to be a breaking change.
Thanks. Definitely something we'll need to update on the ts-bindgen side.
Hey abrgr, great tool -- just wondering if there are any plans to fix this, as it seems impossible to install ts-bindgen
currently. Alternatively, are there any known workarounds?
@sezna there's a workaround mentioned in the opening post: cargo update -p scoped_tls:1.0.1 --precise 1.0.0
.
Sorry for the long delay. Main branch is now updated to use the latest swc (and some other dep upgrades. Trying to fix an issue with using rustfmt in wasm (for the demo) before releasing but will aim to get a cargo version out next week.
On Thu, Nov 2, 2023, 12:29 PM eggyal @.***> wrote:
@sezna https://github.com/sezna there's a workaround mentioned in the opening post: cargo update -p scoped_tls:1.0.1 --precise 1.0.0.
— Reply to this email directly, view it on GitHub https://github.com/ratchetdesigns/ts-bindgen/issues/27#issuecomment-1791069882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOBOZTRJVFYE3SQVESG673YCPC6FAVCNFSM6AAAAAATKKGZSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJRGA3DSOBYGI . You are receiving this because you commented.Message ID: @.***>
Prior to swc-project/swc#3606 (released in swc v1.2.142), swc_common relied upon a public API of v1.0.0 of the scoped-tls crate that has since been broken in a patch release (see alexcrichton/scoped-tls#22). Since ts-bindgen-gen depends upon swc crates prior to this, it fails to compile if Cargo is permitted to follow semver updates (can be overridden e.g. with
cargo update -p scoped_tls:1.0.1 --precise 1.0.0
).Absent the issue being fixed upstream, perhaps ts-bindgen can update to a newer version of swc that does not rely on the broken API?