Skip to content
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

🐛 Bug Report: Pre-compilation error. #41

Closed
cmichelenstrofer opened this issue Dec 4, 2023 · 1 comment · Fixed by #44
Closed

🐛 Bug Report: Pre-compilation error. #41

cmichelenstrofer opened this issue Dec 4, 2023 · 1 comment · Fixed by #44
Labels
bug Something isn't working

Comments

@cmichelenstrofer
Copy link
Owner

Describe the bug

The module is not able to be precompiled, with a long error message.

To Reproduce

julia> using DimensionfulAngles

Expected behavior

Pre-compilations

System

  • OS: PoP!
  • Julia version: 1.9
  • Package version: 0.2
  • Other packages version: [e.g. Unitful.jl 1.12.2, DifferentialEquations.jl 7.6.0, ...]

Additional context

julia> using DimensionfulAngles

[ Info: Precompiling DimensionfulAngles [2d4b8d7a-02d9-40f9-9abe-9c695b77de0d]
WARNING: Method definition edconvert(Unitful.Dimensions{(Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=-1, den=1)),)}, Union{Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=-1, den=1)),)}(), U}, Unitful.Level{L, S, Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=-1, den=1)),)}(), U}} where S where L} where U where T, DimensionfulAngles.Periodic) in module DimensionfulAngles at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:124 overwritten at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:125.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition edconvert(Unitful.Dimensions{(Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=1, den=1)),)}, Union{Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=1, den=1)),)}(), U}, Unitful.Level{L, S, Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=1, den=1)),)}(), U}} where S where L} where U where T, DimensionfulAngles.Periodic) in module DimensionfulAngles at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:124 overwritten at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:125.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition edconvert(Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=1, den=1)), Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=-1, den=1)))}, Union{Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=1, den=1)), Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=-1, den=1)))}(), U}, Unitful.Level{L, S, Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=1, den=1)), Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=-1, den=1)))}(), U}} where S where L} where U where T, DimensionfulAngles.Periodic) in module DimensionfulAngles at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:124 overwritten at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:125.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition edconvert(Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=-1, den=1)), Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=1, den=1)))}, Union{Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=-1, den=1)), Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=1, den=1)))}(), U}, Unitful.Level{L, S, Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=-1, den=1)), Unitful.Dimension{:Time}(power=Base.Rational{Int64}(num=1, den=1)))}(), U}} where S where L} where U where T, DimensionfulAngles.Periodic) in module DimensionfulAngles at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:124 overwritten at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:125.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition edconvert(Unitful.Dimensions{(Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=-1, den=1)),)}, Union{Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=-1, den=1)),)}(), U}, Unitful.Level{L, S, Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=-1, den=1)),)}(), U}} where S where L} where U where T, DimensionfulAngles.Periodic) in module DimensionfulAngles at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:124 overwritten at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:125.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition edconvert(Unitful.Dimensions{(Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=1, den=1)),)}, Union{Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=1, den=1)),)}(), U}, Unitful.Level{L, S, Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=1, den=1)),)}(), U}} where S where L} where U where T, DimensionfulAngles.Periodic) in module DimensionfulAngles at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:124 overwritten at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:125.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition edconvert(Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=1, den=1)), Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=-1, den=1)))}, Union{Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=1, den=1)), Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=-1, den=1)))}(), U}, Unitful.Level{L, S, Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=1, den=1)), Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=-1, den=1)))}(), U}} where S where L} where U where T, DimensionfulAngles.Periodic) in module DimensionfulAngles at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:124 overwritten at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:125.
  ** incremental compilation may be fatally broken for this module **

WARNING: Method definition edconvert(Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=-1, den=1)), Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=1, den=1)))}, Union{Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=-1, den=1)), Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=1, den=1)))}(), U}, Unitful.Level{L, S, Unitful.Quantity{T, Unitful.Dimensions{(Unitful.Dimension{:Angle}(power=Base.Rational{Int64}(num=-1, den=1)), Unitful.Dimension{:Length}(power=Base.Rational{Int64}(num=1, den=1)))}(), U}} where S where L} where U where T, DimensionfulAngles.Periodic) in module DimensionfulAngles at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:124 overwritten at /home/carlos/.julia/packages/UnitfulEquivalences/JvL7D/src/UnitfulEquivalences.jl:125.
  ** incremental compilation may be fatally broken for this module **
@cmichelenstrofer cmichelenstrofer added the bug Something isn't working label Dec 4, 2023
@cmichelenstrofer
Copy link
Owner Author

the issue is that the @eqrelation macro defines both the proportional and antiproportional relations. These are the same for the cases of converting between the same dimensions. So all these expressions:

# default to `uconvert` behavior, temporal
@eqrelation Periodic (Frequency / Frequency = 1)
@eqrelation Periodic (Time / Time = 1)
@eqrelation Periodic (AngularVelocity / AngularVelocity = 1)
@eqrelation Periodic (AngularPeriod / AngularPeriod = 1)
# default to `uconvert` behavior, spatial
@eqrelation Periodic (Wavenumber / Wavenumber = 1)
@eqrelation Periodic (Length / Length = 1)
@eqrelation Periodic (AngularWavenumber / AngularWavenumber = 1)
@eqrelation Periodic (AngularWavelength / AngularWavelength = 1)

have to be replaced with methods for edconvert instead of using the @eqrelation convenience macro.

cmichelenstrofer added a commit that referenced this issue Dec 11, 2023
## 🚨 Checklist
- [x] Read and follow the [Contributing
Guidelines](https://github.com/cmichelenstrofer/.github/blob/main/CONTRIBUTING.md).
- [x] Provide a more detailed description below, including [referencing
or closing the relevant
issue(s)](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)

💔 Thanks!

## PR Description
  - Closes #41 .
- Create methods for `edconvert` instead of using convinience
`@eqrelation` macro.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant