futursolo / stylist-rs

A CSS-in-Rust styling solution for WebAssembly Applications
https://crates.io/crates/stylist
MIT License
371 stars 22 forks source link

Fix #120 - don't compile in `JsValue` in `proc_macro`. #121

Closed finnbear closed 1 year ago

finnbear commented 1 year ago

Fixes #120

If merged, will ultimately require cargo publish of new versions for all three crates.

finnbear commented 1 year ago

I incorrectly assumed that enabling a feature in the proc macro wouldn't also enable it in the main (stylist) crate. Will use a slightly different approach...

... done!

futursolo commented 1 year ago

I think this issue has got attention from the compiler team. I recommend we see if they will prioritise as I do not think this particular regression should make into a release.

If they cannot fix it in a couple days then we can merge this mitigation.

In the meanwhile, would it be possible for you use a nightly version prior to this issue occurring?

finnbear commented 1 year ago

In the meanwhile, would it be possible for you use a nightly version prior to this issue occurring?

Don't worry about me! While I can't change nightly versions, I have pointed Cargo.toml at my github branch and am now up and running.

finnbear commented 1 year ago

I prefer the feature approach

I initially implemented a feature-based approach but it didn't work for reasons previously described - the feature appeared to be enabled when compiling stylist, not just when compiling the proc-macro crate.

It sounds like you may have a solution in mind, but I don't fully understand it, so feel free to fix this issue in whatever way you like in a different PR!