Closed notonamap closed 9 months ago
I think I know what this is - I’m missing an =
in the dependency chain.
Sorry about this - I’ll get a fix out later today. In the meantime the workaround is to not use the feature and import the macros crate explicitly.
I'm hoping the hotfix (once it propagates) will fix this. If not, then I'll likely pull the feature and work towards the ultimate solution (removing the cyclic dependency altogether).
Will give it a few minutes to propagate and reopen this issue if it doesn't fix it.
Ugh - unfortunately it doesn't fix it. I'm going to pull the feature for the meantime while I work on a better solution for 1.35
The documentation in the main branch now describes the appropriate workaround for including macros. I have a plan for how to implement the macros without the circular dependency - I'll see if I can get something in for the next minor version.
To save a lookup:
cargo add rust_decimal
cargo add rust_decimal_macros
Afterwards, you will need to include the macros where you want to use them. i.e.
use rust_decimal_macros::dec;
let num = dec!(123);
Hey there,
using the package with the new "macros" feature seems to be broken atm.
not sure how this is best addressed. proc-macro seems to depend on the from_str decimal stuff. maybe the macro feature needs to be put into a third crate that then reexports macro + decimal? would change the whole project structure so might be a bit overkill.. also definitely not an expert on the intricacies of proc-macros.
rust_decimal: -> decimal (currently rust_decimal) -> macros -> decimal