Closed YingboMa closed 5 months ago
As a quick fix you could do import DynamicQuantities.Units: Ω
(or .SymbolicUnits: Ω
) and work with the symbols directly.
It's weird that precompilation doesn't like the string version. Does anything in that module jump out to you? This is the file:
It's probably due to the eval
in https://github.com/SymbolicML/DynamicQuantities.jl/blob/a31609fa9f732ded5a863b0f9a65211d78b7d889/src/uparse.jl#L37
Oh I see. What other options are there for implementing this?
You can evaluate the expression yourself instead of eval
.
Ah. Of course 🤦♂️
Thanks, will fix.
I guess we’ll need to do something a bit more complex like https://github.com/PainterQubits/Unitful.jl/blob/a09bdaac255d456e6315b77979a48956aca1d3a3/src/user.jl#L692 to get this working without eval
.
Working on this in #106.
Edit: fixed!
MWE: write the literal
u"Ω"
in a package that precompiles.