JuliaBerry / PiCraft.jl

Manipulate Minecraft on the Raspberry Pi from Julia
https://juliaberry.github.io/PiCraft.jl/
Other
38 stars 11 forks source link

Works in 0.7 but not 1.0 #28

Closed pbouffard closed 6 years ago

pbouffard commented 6 years ago

Also, the docs suggest that you can just do things like getPos() unqualified but I had to use, e.g. PiCraft.player.getPos().

Julia 0.7:

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-beta2.6 (2018-07-14 20:16 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit faee1df893* (57 days old master)
|__/                   |  x86_64-apple-darwin14.5.0

julia> using PiCraft
┌ Warning: Deprecated syntax `type` at /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:9.
│ Use `mutable struct` instead.
└ @ ~/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:9
┌ Warning: Deprecated syntax `immutable` at /Users/airpmb/.julia/packages/PiCraft/Rl31/src/blocks.jl:2.
│ Use `struct` instead.
└ @ ~/.julia/packages/PiCraft/Rl31/src/blocks.jl:2
WARNING: importing deprecated binding Base.TCPSocket into PiCraft.
WARNING: Base.TCPSocket is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:9
WARNING: importing deprecated binding Base.connect into PiCraft.
WARNING: Base.connect is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.TCPSocket is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.TCPSocket is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.TCPSocket is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.connect is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.TCPSocket is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.TCPSocket is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.TCPSocket is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.TCPSocket is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.TCPSocket is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.TCPSocket is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
WARNING: Base.connect is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
  likely near /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:22
in Type at /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl

julia> PiCraft.player.getPos()
Command: player.getPos()
Return: -6.01737766774022,12.0,0.389136013254074
┌ Warning: `contains(haystack, needle)` is deprecated, use `occursin(needle, haystack)` instead.
│   caller = mc_send(::String, ::Bool) at PiCraft.jl:107
└ @ PiCraft ~/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:107
(-6.01737766774022, 12.0, 0.389136013254074)

Julia 1.0:

              _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.0 (2018-08-08)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using PiCraft
[ Info: Precompiling PiCraft [6cc4b21d-cec8-58d5-a373-5cd579ce5971]
ERROR: LoadError: syntax: extra token "World" after end of expression
Stacktrace:
 [1] include at ./boot.jl:317 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1038
 [3] include(::Module, ::String) at ./sysimg.jl:29
 [4] top-level scope at none:2
 [5] eval at ./boot.jl:319 [inlined]
 [6] eval(::Expr) at ./client.jl:389
 [7] top-level scope at ./none:3
in expression starting at /Users/airpmb/.julia/packages/PiCraft/Rl31/src/PiCraft.jl:9
ERROR: Failed to precompile PiCraft [6cc4b21d-cec8-58d5-a373-5cd579ce5971] to /Users/airpmb/.julia/compiled/v1.0/PiCraft/mVPQO.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
pbouffard commented 6 years ago

Shoot, apologies. I'd thought I had master but I was using the (now pretty old..) released version 0.1.0.