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

Fix Measurement{Float64}(::Rational) #20

Merged
merged 1 commit into from
Aug 30, 2018

Conversation

tkoolen
Copy link
Contributor

@tkoolen tkoolen commented Aug 30, 2018

Before this, Measurement{Float64}(2//1) would result in

MethodError: Measurement{Float64}(::Rational{Int64}) is ambiguous. Candidates:
  (::Type{Measurement{T}})(x::S) where {T, S} in Measurements at /home/twan/.julia/packages/Measurements/57KtG/src/Measurements.jl:61
  (::Type{T})(x::Rational{S}) where {S, T<:AbstractFloat} in Base at rational.jl:90
Possible fix, define
  (::Type{Measurement{T}})(::Rational{S})

on Julia 1.0.

Before this, `Measurement{Float64}(2//1)` would result in

```julia
MethodError: Measurement{Float64}(::Rational{Int64}) is ambiguous. Candidates:
  (::Type{Measurement{T}})(x::S) where {T, S} in Measurements at /home/twan/.julia/packages/Measurements/57KtG/src/Measurements.jl:61
  (::Type{T})(x::Rational{S}) where {S, T<:AbstractFloat} in Base at rational.jl:90
Possible fix, define
  (::Type{Measurement{T}})(::Rational{S})
```

on Julia 1.0.
@tkoolen
Copy link
Contributor Author

tkoolen commented Aug 30, 2018

CI failures unrelated.

@giordano
Copy link
Member

Good catch, thank you!

I guess you'd like to have a new tagged version, right? 😉

@tkoolen
Copy link
Contributor Author

tkoolen commented Aug 30, 2018

Yeah, if possible, thanks! The test failures are due to a new RecipesBase version that requires Julia 1.0 (which is why tests pass on 0.7 but not 1.0).

@giordano giordano merged commit 5845e18 into JuliaPhysics:master Aug 30, 2018
@tkoolen tkoolen deleted the tk/fix-rational branch September 3, 2018 15:13
@giordano
Copy link
Member

giordano commented Sep 6, 2018

An update: I'm willing to tag a new release as soon as possible, I'm just trying to understand what to do with RecipesBase: JuliaPlots/RecipesBase.jl#49

@tkoolen
Copy link
Contributor Author

tkoolen commented Sep 6, 2018

No worries, take your time. I'm not blocked by it. I'm using Measurements.jl in one of the examples for RigidBodySim.jl, but I've just disabled the test set that runs that example for now to get CI to pass. It's a very nice example for demos, but it's not the end of the world to tell people to check out Measurements master for now.

@giordano
Copy link
Member

giordano commented Sep 8, 2018

v1. 0.1 released: JuliaLang/METADATA.jl#17841

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants