-
Notifications
You must be signed in to change notification settings - Fork 25
Apparent Issue with Precompilation for Dependent Packages #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Revise.jl
Hi @cadojo, Thanks for the report. Excited to hear about the package you are making! Is this Julia 1.10? Does it go away on Julia 1.9? One thing to note is that the SymbolicDimensions symbols (e.g., Best, |
The quick fix would be to change + flux_distance(m, M) = 10^((m - M + 5) // 5) * u"Constants.pc"
- flux_distance(m, M) = 10^((m - M + 5) // 5) * us"Constants.pc"
|
Thanks Miles! I did change all instances of
|
Awesome. Okay I think we should go with that, what do you think? Then for display, I think @gaurav-arya has a good strategy proposed in #48 Basically, one can display units with u"Constants.pc" / 0.05 |> as_u(us"Constants.kpc) which would display |
Works for me, and I like the unit conversion feature and syntax. The So all of this is good for display and for my purposes, but could this issue pop up again? If I understand correctly, symbolic units can't be used in any Julia package, because they're created on-the-fly. With native code cacheing in Julia v1.9 and later, I wonder how much slower the package would be if all of the symbolic units are created at once? If no one has done that experiment yet, and if there's interest in the future, I'd be interested in trying that out. |
Okay now this issue is fixed for real – please try it out! You can do, e.g., const my_unit = us"ohm" just fine, and precompilation should be good |
Uh oh!
There was an error while loading. Please reload this page.
Edit: Actually, this issue happens even if I don't use
Revise.jl
! I think the@eval
line somehow breaks precompilation?I'm developing a new package,
AstrophysicalCalculations
, which depends onDynamicQuantities
, and I'm usingRevise
to assist with that development. When I enterusing Revise, AstrophysicalCalculations
, I get the error shown below. I believe that the@eval
line insymbolic_dimensions.jl:215
makes using Revise impossible for dependent packages. I could be wrong / using this incorrectly, and this issue may be unresolvable, but I wanted to post this issue for awareness. Thank you forDynamicQuantities.jl
!The line where my package fails:
src/src/StellarObservations.jl:111
.The text was updated successfully, but these errors were encountered: