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

Precompilation problem with tuples #185

Closed
cstjean opened this issue Nov 5, 2018 · 3 comments
Closed

Precompilation problem with tuples #185

cstjean opened this issue Nov 5, 2018 · 3 comments

Comments

@cstjean
Copy link
Contributor

cstjean commented Nov 5, 2018

I have a weird problem with precompilation, and the latest unit changes. If I have a package called BlagData, containing

module BlagData

using Unitful

wab = [("a", Unitful.l),
       ("b", Unitful.°C),]

end

and I run the following code, I get an error: (using Julia 1.0.1 Linux, on Unitful#master)

julia> using BlagData, Unitful
[ Info: Recompiling stale cache file /home/cst-jean/.julia/compiled/v1.0/BlagData/KbqDT.ji for BlagData [5570af46-b12d-5143-b4e4-6f3fbba47b61]

julia> dinfo = [("Plan", Unitful.m),
                ("Plan", Unitful.°C),]
ERROR: TypeError: in arrayset, expected Tuple{String,Unitful.FreeUnits}, got Tuple{String,Unitful.FreeUnits{(m,),𝐋,nothing}}
Stacktrace:
 [1] setindex! at ./array.jl:769 [inlined]
 [2] copyto!(::Array{Tuple{String,Unitful.FreeUnits},1}, ::Tuple{Tuple{String,Unitful.FreeUnits{(m,),𝐋,nothing}},Tuple{String,Unitful.FreeUnits{(K,),𝚯,Unitful.Affine{-5463//20}}}}) at ./abstractarray.jl:649
 [3] vect(::Tuple{String,Unitful.FreeUnits{(m,),𝐋,nothing}}, ::Vararg{Any,N} where N) at ./array.jl:151
 [4] top-level scope at none:0

It only happens with celsius or fahrenheit.

EDIT: shortened example

@ajkeller34
Copy link
Collaborator

That is weird. I don't have an immediate answer but I'm looking into it.

@cstjean
Copy link
Contributor Author

cstjean commented Nov 5, 2018

JuliaLang/julia#29936

@cstjean
Copy link
Contributor Author

cstjean commented Nov 6, 2018

I don't think there's anything to be done here.

@cstjean cstjean closed this as completed Nov 6, 2018
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

No branches or pull requests

2 participants