JuliaTeX / TikzGraphs.jl

This library generates graph layouts using the TikZ graph layout package.
Other
77 stars 18 forks source link

Doesn't seem to work on Julia v1.0 #25

Closed wangnangg closed 6 years ago

wangnangg commented 6 years ago

Error message upon building:

Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: MethodError: no method matching haskey(::Nothing, ::String)
Closest candidates are:
  haskey(::Base.Iterators.Pairs, ::Any) at iterators.jl:247
  haskey(::Dict, ::Any) at dict.jl:546
  haskey(::Base.ImmutableDict, ::Any) at dict.jl:731
  ...
Stacktrace:
 [1] _get_deps!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:396
 [2] #build#55(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:434
 [3] build at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:411 [inlined]
 [4] do_build!(::Dict{Symbol,Any}, ::Array{Pkg.Types.PackageSpec,1}, ::Dict{Symbol,Any}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:601
 [5] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:686
 [6] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:685
 [7] do_cmd!(::Pkg.REPLMode.PkgCommand, ::REPL.LineEditREPL) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:542
 [8] #do_cmd#30(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:507
 [9] do_cmd at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:503 [inlined]
 [10] (::getfield(Pkg.REPLMode, Symbol("##41#44")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:842
 [11] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [12] invokelatest at ./essentials.jl:685 [inlined]
 [13] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/LineEdit.jl:2261
 [14] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:1029
 [15] run_repl(::REPL.AbstractREPL, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:191
 [16] (::getfield(Base, Symbol("##720#722")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311
 [17] #invokelatest#1 at ./essentials.jl:686 [inlined]
 [18] invokelatest at ./essentials.jl:685 [inlined]
 [19] macro expansion at ./logging.jl:308 [inlined]
 [20] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330
 [21] exec_options(::Base.JLOptions) at ./client.jl:242
 [22] _start() at ./client.jl:421
mykelk commented 6 years ago

@Shushman this is a dependency for BayesNets.jl. Does this work for you in 1.0?

Shushman commented 6 years ago

I am able to using and test TikzGraphs on 1.0. Is the above error due to it not having a Project.toml or something?

wangnangg commented 6 years ago

using and test do not work for me. I am using the prebuilt Julia 1.0 binary.

julia> using TikzGraphs
[ Info: Precompiling TikzGraphs [b4f28e30-c73f-5eaf-a395-8a9db949a742]
ERROR: LoadError: UndefVarError: mimewritable not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
 [2] top-level scope at none:0
 [3] include at ./boot.jl:317 [inlined]
 [4] include_relative(::Module, ::String) at ./loading.jl:1038
 [5] include(::Module, ::String) at ./sysimg.jl:29
 [6] top-level scope at none:2
 [7] eval at ./boot.jl:319 [inlined]
 [8] eval(::Expr) at ./client.jl:389
 [9] top-level scope at ./none:3
in expression starting at /home/wangnan/.julia/packages/TikzPictures/9Y3H0/src/TikzPictures.jl:105
ERROR: LoadError: Failed to precompile TikzPictures [37f6aa50-8035-52d0-81c2-5a1d08754b2d] to /home/wangnan/.julia/compiled/v1.0/TikzPictures/826g6.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
 [4] _require(::Base.PkgId) at ./logging.jl:311
 [5] require(::Base.PkgId) at ./loading.jl:852
 [6] macro expansion at ./logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at ./loading.jl:834
 [8] include at ./boot.jl:317 [inlined]
 [9] include_relative(::Module, ::String) at ./loading.jl:1038
 [10] include(::Module, ::String) at ./sysimg.jl:29
 [11] top-level scope at none:2
 [12] eval at ./boot.jl:319 [inlined]
 [13] eval(::Expr) at ./client.jl:389
 [14] top-level scope at ./none:3
in expression starting at /home/wangnan/.julia/packages/TikzGraphs/EDkIk/src/TikzGraphs.jl:12
ERROR: Failed to precompile TikzGraphs [b4f28e30-c73f-5eaf-a395-8a9db949a742] to /home/wangnan/.julia/compiled/v1.0/TikzGraphs/oGL7c.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] macro expansion at ./logging.jl:313 [inlined]
 [3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1184
 [4] _require(::Base.PkgId) at ./logging.jl:311
 [5] require(::Base.PkgId) at ./loading.jl:852
 [6] macro expansion at ./logging.jl:311 [inlined]
 [7] require(::Module, ::Symbol) at ./loading.jl:834
Shushman commented 6 years ago

Did you dev TikzPictures or add TikzPictures first? Or did you just do add TikzGraphs? EDIT - These packages are currently being fixed, so the registered versions of them are still incorrect for Julia 1.0. You need to dev the packages rather than add-ing them in the package manager (see https://docs.julialang.org/en/latest/stdlib/Pkg/ for details) In this specific case, first dev TikzPictures which will add the latest master and then do using TikzPictures to see that it compiles correctly. Then do rm TikzGraphs so that it is removed from your manifest and then do dev TikzGraphs. After this you should be able to build it.

wangnangg commented 6 years ago

It works.

dev TikzPictures
dev TikzGraphs
Shushman commented 6 years ago

Great! I am closing the issue for now.