I’m using Julia 1.7.2 and I’m trying to set up a project to work on. I’ve created the folder using DrWatson
and I’ve added Revise
to startup.jl
: the idea is of course to have to ability to modify code (I’m using VSCode btw) without having to reload the REPL everytime. The problem is, when I open julia
in the project folder, run ] instantiate
and then call using Tesi
(where Tesi
is the project name, which is also the name of the only .jl
file I’m using and the main module), I get these warnings:
┌ Warning: Package Base does not have DrWatson in its dependencies:
│ - If you have Base checked out for development and have
│ added DrWatson as a dependency but haven't updated your primary
│ environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with Base
└ Loading DrWatson into Base from project dependency, future warnings for Base are suppressed.
┌ Warning:
└ Loading LinearAlgebra into Tesi from project dependency, future warnings for Tesi are suppressed.
Running ] resolve
yields no changes to the .toml
files and doesn’t solve the problem.
My code in Tesi.jl
looks something like this:
using DrWatson
@quickactivate "Tesi"
module Tesi
import LinearAlgebra
# ... structs and functions, no other imports are made
end #module Tesi
The output from ] status
in the Tesi
environment is
(Tesi) pkg> st
Project Tesi v0.1.0
Status `E:\Università\2020-2021\Tesi\Project.toml`
[634d3b9d] DrWatson v2.9.1
[22787eb5] Term v0.2.0
while the output from ] status
in the default environment is
(@v1.7) pkg> st
Status `C:\Users\Niky\.julia\environments\v1.7\Project.toml`
[5fb14364] OhMyREPL v0.5.12
[14b8a8f1] PkgTemplates v0.7.26
[295af30f] Revise v3.3.3
And just in case, here is my startup.jl
file:
atreplinit() do repl
try
@eval using OhMyREPL
catch e
@warn "error while importing OhMyREPL" e
end
try
@eval using Revise
catch e
@warn "error while importing Revise" e
end
end
and my Project.toml
file:
name = "Tesi"
uuid = "dc6fdeef-2f65-43ab-9e33-8e7f18faa1fd"
authors = ["Nicholas Pini <ultrapoci@gmail.com> and contributors"]
version = "0.1.0"
[deps]
DrWatson = "634d3b9d-ee7a-5ddf-bec9-22491ea816e1"
Term = "22787eb5-b846-44ae-b979-8e399b8463ab"
[compat]
julia = "1.7.2"
Searching online I’ve found that the solution would be to run ] instantiate
, but as I’ve said above, I’m already doing so.
As far as I’m aware, everything works despite the warnings: the module is imported correctly and if I modify the code, Revise
kicks in and updates the functions in the module correctly.