bmad-sim / AtomicAndPhysicalConstants.jl

Julia package for handling particle identification in simulations.
MIT License
0 stars 1 forks source link

Warning when `using AtomicAndPhysicalConstants` #28

Closed DavidSagan closed 4 months ago

DavidSagan commented 4 months ago

Julia version 1.10.0:

julia> using AtomicAndPhysicalConstants Precompiling AtomicAndPhysicalConstants Info Given AtomicAndPhysicalConstants was explicitly requested, output will be shown live ┌ Warning: Replacing docs for AtomicAndPhysicalConstants.Particle :: Union{} in module AtomicAndPhysicalConstants └ @ Base.Docs docs/Docs.jl:243 ┌ Warning: Replacing docs for AtomicAndPhysicalConstants.Particle :: Union{} in module AtomicAndPhysicalConstants └ @ Base.Docs docs/Docs.jl:243 WARNING: Method definition (::Type{AtomicAndPhysicalConstants.Particle})(AbstractString, Int32, Float64, Float64, Float64) in module AtomicAndPhysicalConstants at /Users/dcs16/.julia/dev/AtomicAndPhysicalConstants/src/ParticleTypes.jl:28 overwritten on the same line (check for duplicate calls to include). ERROR: Method overwriting is not permitted during Module precompilation. Use __precompile__(false) to opt-out of precompilation. ? AtomicAndPhysicalConstants [ Info: Precompiling AtomicAndPhysicalConstants [5c0d271c-5419-4163-b387-496237733d8b] ┌ Warning: Replacing docs for AtomicAndPhysicalConstants.Particle :: Union{} in module AtomicAndPhysicalConstants └ @ Base.Docs docs/Docs.jl:243 ┌ Warning: Replacing docs for AtomicAndPhysicalConstants.Particle :: Union{} in module AtomicAndPhysicalConstants └ @ Base.Docs docs/Docs.jl:243 WARNING: Method definition (::Type{AtomicAndPhysicalConstants.Particle})(AbstractString, Int32, Float64, Float64, Float64) in module AtomicAndPhysicalConstants at /Users/dcs16/.julia/dev/AtomicAndPhysicalConstants/src/ParticleTypes.jl:28 overwritten on the same line (check for duplicate calls to include). ERROR: Method overwriting is not permitted during Module precompilation. Use __precompile__(false) to opt-out of precompilation. [ Info: Skipping precompilation since precompile(false). Importing AtomicAndPhysicalConstants [5c0d271c-5419-4163-b387-496237733d8b]. ┌ Warning: Replacing docs for AtomicAndPhysicalConstants.Particle :: Union{} in module AtomicAndPhysicalConstants └ @ Base.Docs docs/Docs.jl:243 ┌ Warning: Replacing docs for AtomicAndPhysicalConstants.Particle :: Union{} in module AtomicAndPhysicalConstants └ @ Base.Docs docs/Docs.jl:243 ┌ Warning: Replacing docs for AtomicAndPhysicalConstants.Particle :: Union{} in module AtomicAndPhysicalConstants └ @ Base.Docs docs/Docs.jl:243 ┌ Warning: Replacing docs for AtomicAndPhysicalConstants.SubatomicSpecies :: Union{} in module AtomicAndPhysicalConstants └ @ Base.Docs docs/Docs.jl:243 ┌ Warning: Replacing docs for AtomicAndPhysicalConstants.AtomicSpecies :: Union{} in module AtomicAndPhysicalConstants └ @ Base.Docs docs/Docs.jl:243

rot4te commented 4 months ago

Thanks. It looks like I need to revisit the doc strings, as well as make sure there are no duplicate includes. I know for sure there are some re-includes (whoopsie), and we talked about updating the documentation anyhow. I'll get to it as soon as I'm able.

DavidSagan commented 4 months ago

@rot4te Thanks. I was looking at the documentation for setunits and it is a bit cryptic. For one, the possible values of unitsystem are not given. For another, the defaults depend upon the unitsystem and the documentation here does not address this. Another thing I would replace something like mass::Union{Symbol,Expr}=:default with mass::Union{Symbol,Expr} = :default as much more readable (and I would make the change in the code as well).