abishekatp / stylers

Fully compile time scoped CSS for Leptos components
MIT License
139 stars 13 forks source link

Package unable to compile #34

Closed darrenpicard25 closed 1 year ago

darrenpicard25 commented 1 year ago

This package fails to compile when added to a project. Receiving errors: ![Uploading screenshot_20230816_210022.png…]()

Steps to reproduce

cargo new styler_test
cd styler_test
cargo add stylers
cargo +nightly build

Kinda feels like an issue with the proc_macro on nightly rust but is making it unable to use this package for personal project and i would like to

darrenpicard25 commented 1 year ago

Versions I'm running as I assume this will be the next question rustup 1.26.0 rustc 1.71.1 cargo 1.71.1

darrenpicard25 commented 1 year ago

screenshot_20230816_210022

Image in main issue doesnt seem to have uploaded properly so posting again here

SadraMoh commented 1 year ago

Same issue here,

Full compile time logs:

cargo leptos watch
   Compiling stylers v0.3.1
error[E0615]: attempted to take value of method `column` on type `proc_macro::Span`
  --> /home/sadramoh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stylers-0.3.1/src/style/css_style_rule.rs:74:47
   |
74 | ...                   pre_col = end.column;
   |                                     ^^^^^^ method, not a field
   |
help: use parentheses to call the method
   |
74 |                                 pre_col = end.column();
   |                                                     ++

error[E0615]: attempted to take value of method `line` on type `proc_macro::Span`
  --> /home/sadramoh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stylers-0.3.1/src/style/css_style_rule.rs:75:48
   |
75 | ...                   pre_line = end.line;
   |                                      ^^^^ method, not a field
   |
help: use parentheses to call the method
   |
75 |                                 pre_line = end.line();
   |                                                    ++

error[E0615]: attempted to take value of method `column` on type `proc_macro::Span`
  --> /home/sadramoh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stylers-0.3.1/src/style/utils.rs:60:25
   |
60 |     let cur_col = start.column;
   |                         ^^^^^^ method, not a field
   |
help: use parentheses to call the method
   |
60 |     let cur_col = start.column();
   |                               ++

error[E0615]: attempted to take value of method `line` on type `proc_macro::Span`
  --> /home/sadramoh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stylers-0.3.1/src/style/utils.rs:61:26
   |
61 |     let cur_line = start.line;
   |                          ^^^^ method, not a field
   |
help: use parentheses to call the method
   |
61 |     let cur_line = start.line();
   |                              ++

error[E0615]: attempted to take value of method `column` on type `proc_macro::Span`
  --> /home/sadramoh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stylers-0.3.1/src/style/utils.rs:65:20
   |
65 |     *pre_col = end.column;
   |                    ^^^^^^ method, not a field
   |
help: use parentheses to call the method
   |
65 |     *pre_col = end.column();
   |                          ++

error[E0615]: attempted to take value of method `line` on type `proc_macro::Span`
  --> /home/sadramoh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stylers-0.3.1/src/style/utils.rs:66:21
   |
66 |     *pre_line = end.line;
   |                     ^^^^ method, not a field
   |
help: use parentheses to call the method
   |
66 |     *pre_line = end.line();
   |                         ++

For more information about this error, try `rustc --explain E0615`.
error: could not compile `stylers` (lib) due to 6 previous errors
sambonbonne commented 1 year ago

Maybe duplicate of https://github.com/abishekatp/stylers/issues/32?

darrenpicard25 commented 1 year ago

Maybe duplicate of #32?

yup looks like a duplicate. Missed that