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

UndefVarError while loading package on Julia 0.7 #48

Closed
iamed2 opened this issue Oct 12, 2017 · 5 comments
Closed

UndefVarError while loading package on Julia 0.7 #48

iamed2 opened this issue Oct 12, 2017 · 5 comments

Comments

@iamed2
Copy link

iamed2 commented Oct 12, 2017

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-DEV.2129 (2017-10-12 18:00 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit ed7c7ad1bc (0 days old master)
|__/                   |  x86_64-apple-darwin17.0.0

julia> using SimpleTraits

WARNING: deprecated syntax "immutable" at /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:106.
Use "struct" instead.

WARNING: deprecated syntax "type" at /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:433.
Use "mutable struct" instead.
INFO: Precompiling module SimpleTraits.

WARNING: deprecated syntax "immutable" at /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:106.
Use "struct" instead.

WARNING: deprecated syntax "type" at /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:433.
Use "mutable struct" instead.
WARNING: current_module() is deprecated, use `@__MODULE__` instead.
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:68
 [2] current_module() at ./deprecated.jl:1297
 [3] include_relative(::Module, ::String) at ./loading.jl:533
 [4] include(::Module, ::String) at ./sysimg.jl:14
 [5] anonymous at ./<missing>:2
 [6] eval(::Module, ::Expr) at ./sysimg.jl:53
 [7] process_options(::Base.JLOptions) at ./client.jl:307
 [8] _start() at ./client.jl:391
in expression starting at /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:6

WARNING: deprecated syntax "parametric method syntax stripNot{T <: Trait}(::Type{T}) around /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:44".
Use "stripNot(#unused#::Type{T}) where T <: Trait" instead.

WARNING: deprecated syntax "parametric method syntax stripNot{T <: Trait}(::Type{Not{T}}) around /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:45".
Use "stripNot(#unused#::Type{Not{T}}) where T <: Trait" instead.

WARNING: deprecated syntax "parametric method syntax stripNot{T <: Trait}(::Type{Not{Not{T}}}) around /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:46".
Use "stripNot(#unused#::Type{Not{Not{T}}}) where T <: Trait" instead.

WARNING: deprecated syntax "parametric method syntax trait{T <: Trait}(::Type{T}) around /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:64".
Use "trait(#unused#::Type{T}) where T <: Trait" instead.

WARNING: deprecated syntax "parametric method syntax trait{T <: Trait}(::Type{Not{T}}) around /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:65".
Use "trait(#unused#::Type{Not{T}}) where T <: Trait" instead.

WARNING: deprecated syntax "parametric method syntax istrait{T <: Trait}(tr::Type{T}) around /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:84".
Use "istrait(tr::Type{T}) where T <: Trait" instead.
Use of final value of loop variable "i" around /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:281 is deprecated. In the future the variable will be local to the loop instead.
ERROR: LoadError: LoadError: LoadError: UndefVarError: Tr not defined
Stacktrace:
 [1] macro expansion at /Users/ericdavies/.julia/v0.7/MacroTools/src/macro.jl:14 [inlined]
 [2] @traitimpl(::LineNumberNode, ::Module, ::Any) at /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:168
 [3] include_relative(::Module, ::String) at ./loading.jl:533
 [4] include at ./sysimg.jl:14 [inlined]
 [5] include(::String) at /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:3
 [6] include_relative(::Module, ::String) at ./loading.jl:533
 [7] include(::Module, ::String) at ./sysimg.jl:14
 [8] anonymous at ./<missing>:2
in expression starting at /Users/ericdavies/.julia/v0.7/SimpleTraits/src/base-traits.jl:11
in expression starting at /Users/ericdavies/.julia/v0.7/SimpleTraits/src/base-traits.jl:11
in expression starting at /Users/ericdavies/.julia/v0.7/SimpleTraits/src/SimpleTraits.jl:522
ERROR: Failed to precompile SimpleTraits to /Users/ericdavies/.julia/lib/v0.7/SimpleTraits.ji.
Stacktrace:
 [1] compilecache(::String) at ./loading.jl:661
 [2] _require(::Symbol) at ./loading.jl:472
 [3] require(::Symbol) at ./loading.jl:324

I have time to dedicate to fixing this to submit a PR but I need help to figure out what's going on. I just have wild guesses at this point as I'm not familiar with SimpleTraits and I'm barely acquainted with MacroTools. My main motivation is getting LightGraphs working.

@iamed2
Copy link
Author

iamed2 commented Oct 12, 2017

Looks like this is a MacroTools bug which is fixed on master of that package.

@mauro3
Copy link
Owner

mauro3 commented Oct 12, 2017

Thanks! Note, that if you are also concerned about deprecations: with moving to where syntax, there is a slight problem: #46 . I've been exploring some alternatives on https://github.com/mauro3/SimpleTraits.jl/tree/m3/associated-types (among other things).

@mauro3
Copy link
Owner

mauro3 commented Oct 12, 2017

(Also note, that I'm on vacation from tomorrow for a week, so I probably can't help then.)

@iamed2
Copy link
Author

iamed2 commented Oct 12, 2017

At this point I'm not too worried about deprecations as new ones could pop up at any time between now and 0.7 release. I just need packages to work so I can test that my packages work :)

I think just getting the version tagging going starting with MacroTools is all that's necessary. Once this package can set a lower bound on the next release of MacroTools then I can try to get LightGraphs to set a lower bound on this package, etc.

Until then I'll work on master everything

@mauro3
Copy link
Owner

mauro3 commented Nov 23, 2017

I just updated the package to run again on 0.7 (on master for now, but I could tag if desired). However the parametric method deprecations remain, for now.

@mauro3 mauro3 closed this as completed Nov 23, 2017
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