Py2Jl icon indicating copy to clipboard operation
Py2Jl copied to clipboard

Package didn't work, but I got it do work with a downgrade hack

Open PallHaraldsson opened this issue 5 years ago • 3 comments

Should it be good with this fix?

(@v1.6) pkg> add [email protected]
Updating `~/.julia/environments/v1.6/Project.toml`
  [d8e11817] ↓ MLStyle v0.4.0 ⇒ v0.3.1


julia> using MLStyle.Infras

julia> @time using Py2Jl
[ Info: Precompiling Py2Jl [e53ffe30-a369-11e8-316f-1171168155ae]
┌ Warning: Pkg.installed() is deprecated
└ @ Pkg /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Pkg.jl:560
 11.723012 seconds (3.68 M allocations: 185.802 MiB, 0.42% gc time)


before I got:

julia> @time using Py2Jl
[ Info: Precompiling Py2Jl [e53ffe30-a369-11e8-316f-1171168155ae]
┌ Warning: Pkg.installed() is deprecated
└ @ Pkg /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Pkg.jl:560
ERROR: LoadError: LoadError: UndefVarError: Infras not defined
Stacktrace:
 [1] include at ./Base.jl:369 [inlined]
 [2] include(::String) at /home/pharaldsson_sym/.julia/packages/Py2Jl/PeoUh/src/Py2Jl.jl:1
 [3] top-level scope at /home/pharaldsson_sym/.julia/packages/Py2Jl/PeoUh/src/Py2Jl.jl:5
 [4] include(::Module, ::String) at ./Base.jl:369
 [5] top-level scope at none:2
 [6] eval at ./boot.jl:331 [inlined]
 [7] eval(::Expr) at ./client.jl:446
 [8] top-level scope at ./none:3
in expression starting at /home/pharaldsson_sym/.julia/packages/Py2Jl/PeoUh/src/ASTGen.jl:1
in expression starting at /home/pharaldsson_sym/.julia/packages/Py2Jl/PeoUh/src/Py2Jl.jl:1
ERROR: Failed to precompile Py2Jl [e53ffe30-a369-11e8-316f-1171168155ae] to /home/pharaldsson_sym/.julia/compiled/v1.6/Py2Jl/hBweI_nzYII.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1328
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923
 [6] top-level scope at timing.jl:174

PallHaraldsson avatar Jun 10 '20 22:06 PallHaraldsson

Hi, I just added CompatHelper in 998bca5f215f339d884ee244172cedd07dbd1efa and I think for now we could just add a few compat info in the Project.toml, but I believe @thautwarm need to do some updates regarding to the MLStyle new version.

Roger-luo avatar Jun 11 '20 02:06 Roger-luo

Yes, v0.4 will break some corner use. Most mLStyle users do not use those breaking features at all, but I did use a lot..

thautwarm avatar Jun 11 '20 02:06 thautwarm

@PallHaraldsson it works now. also, do you have interests in this transpiler? this approach is solid and can even ship most of python libraries to julia.

thautwarm avatar Jun 12 '20 14:06 thautwarm