Usage of package seems to require 'activate' (pkg manager)


#1

on RC2 using myPackage failes, because julia seems to be looking for a dependency package in the ‘standard Project.toml’ instead of the Project.toml of the package itself.

Thus, I need to first ]activate myPackage prior to using it.
Is this expected?
I don’t think this was the case in beta.
Can anyone reproduce this?

PS C:\Users\bernhard.konig\Documents\ASync\home\Code\Julia> julia
[ Info: Executing .juliarc.jl...
Dates.now() = 2018-08-04T09:33:58.497
[ Info: Using Revise...
[ Info: done.

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _ |  |
  | | |_| | | | (_| |  |  Version 0.7.0-rc2.0 (2018-08-02 19:14 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-w64-mingw32

(v0.7) pkg> st
    Status `C:\Users\bernhard.konig\.julia\environments\v0.7\Project.toml`
  [6e4b80f9] BenchmarkTools v0.3.2
  [336ed68f] CSV v0.2.5+ #master (https://github.com/JuliaData/CSV.jl.git)
  [a2441757] Coverage v0.6.0
  [a93c6f00] DataFrames v0.12.0
  [7806a523] DecisionTree v0.8.0
  [e30172f5] Documenter v0.19.2
  [033835bb] JLD2 v0.0.6+ #e84b06e (https://github.com/simonster/JLD2.jl.git)
  [98b081ad] Literate v0.3.0
  [a15396b6] OnlineStats v0.18.0
  [c46f51b8] ProfileView v0.3.0
  [438e738f] PyCall v1.17.1+ #8e89bc4 (https://github.com/JuliaPy/PyCall.jl.git)
  [295af30f] Revise v0.5.4
  [2913bbd2] StatsBase v0.24.0
  [4c63d2b9] StatsFuns v0.7.0+ #master (https://github.com/JuliaStats/StatsFuns.jl.git)
  [9a3f8284] Random

julia> using DecisionTrees
[ Info: Recompiling stale cache file C:\Users\bernhard.konig\.julia\compiled\v0.7\DecisionTrees\1yQDP.ji for DecisionTrees [5a283280-6d82-11e8-2283-f1ea5a810282]
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: Deprecated syntax `implicit assignment to global variable `symbols_present``.
│ Use `global symbols_present` instead.
└ @ none:0
ERROR: LoadError: ArgumentError: Package ProgressMeter [92933f4c-e287-5a05-a399-4b506db050ca] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

Stacktrace:
 [1] _require(::Base.PkgId) at .\loading.jl:923
 [2] require(::Base.PkgId) at .\loading.jl:852
 [3] macro expansion at .\logging.jl:311 [inlined]
 [4] require(::Module, ::Symbol) at .\loading.jl:834
 [5] include at .\boot.jl:317 [inlined]
 [6] include_relative(::Module, ::String) at .\loading.jl:1038
 [7] include(::Module, ::String) at .\sysimg.jl:29
 [8] top-level scope at none:2
 [9] eval at .\boot.jl:319 [inlined]
 [10] eval(::Expr) at .\client.jl:399
 [11] top-level scope at .\none:3
in expression starting at C:\Users\bernhard.konig\Documents\ASync\home\Code\Julia\DecisionTrees.jl\src\DecisionTrees.jl:40
ERROR: Failed to precompile DecisionTrees [5a283280-6d82-11e8-2283-f1ea5a810282] to C:\Users\bernhard.konig\.julia\compiled\v0.7\DecisionTrees\1yQDP.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:1185
 [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

(v0.7) pkg> activate DecisionTrees.jl

(DecisionTrees.jl) pkg> st
Project DecisionTrees v0.0.1
    Status `C:\Users\bernhard.konig\Documents\ASync\home\Code\Julia\DecisionTrees.jl\Project.toml`
  [336ed68f] CSV v0.2.5
  [a93c6f00] DataFrames v0.12.0
  [9a8bc11e] DataStreams v0.3.6
  [033835bb] JLD2 v0.0.6
  [a15396b6] OnlineStats v0.18.0
  [92933f4c] ProgressMeter v0.5.6
  [438e738f] PyCall v1.17.1+ #master (https://github.com/JuliaPy/PyCall.jl.git)
  [295af30f] Revise v0.5.4
  [2913bbd2] StatsBase v0.24.0
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [9a3f8284] Random
  [10745b16] Statistics
  [8dfed614] Test

julia> using DecisionTrees
[ Info: Precompiling DecisionTrees [5a283280-6d82-11e8-2283-f1ea5a810282]
┌ Warning: __precompile__() is now the default
│   caller = __precompile__() at loading.jl:777
└ @ Base .\loading.jl:777
┌ Warning: Deprecated syntax `implicit assignment to global variable `symbols_present``.
│ Use `global symbols_present` instead.
└ @ none:0

julia>

#2

The error says:

That would be (v0.7) pkg> instantiate in the REPL, did you try that?


#3

Thanks. That actually gives me another error.

Do you know what the easiest way is to ‘delete/reset’ (or reinstall) all packages?

(v0.7) pkg> instantiate
  Updating registry at `C:\Users\bernhard.konig\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: git object 9c6b927293e9133277d8c99f06ab3d5470b34572 could not be found

#4

If you want to reset everything (your depot (i.e.~/.julia) might be in a bad state?) then the easiest way forward might be to rename it (so the package manager thinks its gone) and do something like this:

pkg> add BenchmarkTools CSV#master Coverage ...
pkg> instantiate