Closed johannesnauta closed 8 months ago
Nope, julia-repl
is just locating your toml
files to activate the project. No write operations are supposed to happen. You can check that, eg read atime, mtime and ctime of the Project.toml (google for tutorials on how to do it). mtime and ctime of your toml files should be unaffected.
What OS are you on?
Yeah that's what I expected, yet then it is still strange that this only happens within a julia-repl
...
I am on
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
Do you have something in your startup.jl
? I had similar problems in the past, and the problem was the following: julia
starts in default env. Now let's say your startup includes using Revise
, thus loading some transitive dependency which version is based on your global/default manifest. If you now activate your project, there might be a conflict between the already loaded code and the versions from your project manifest which can lead to very anoying recompilation I every session.
My problem was solved by declaring
(setq julia-repl-switches "--project=@.")
and thus activating the project env before executing the startup.jl
. Due to the stacked environments, its still possible to load global packages but know they need to conform with the local manifest.
Disclaimer: The solution worked for me, and I built this mental model around it, which kinda explains it. Not sure if it is actually correct though, I don't know about the intricate details of the interaction between various environments :D
That was indeed the case. my startup.jl
was as follows
So it is indeed including using Revise
. This resulted in the 'conflict' between by global/project manifest. Your suggestion indeed fixed the problem, so thanks a lot!
I am not sure if this is the right place, as I am not fully sure that the problem lies with
julia-repl
. I apologize if this turns out to not be the case. Nonetheless, I have a 'gut' feeling thatjulia-repl
is messing with theProject.toml
and/orManifest.toml
files somehow. The last few days I have noticed that I need to precompile packages much more often, even after having just calledPkg.precompile()
in a previous session and changed nothing in the meantime. This appears to only occur when I usejulia-repl
, and it does not occur when just using the command line (or, e.g.,vterm
from within Emacs).An example workflow is as follows:
C-c C-a
[ Info: Emacs vterm detected julia> import Pkg; Pkg.activate("/home/exampleproject/") Activating project at
~/exampleproject/
(myProject) pkg> st Project ExampleProject v0.1.0 Status
~/exampleproject/Project.toml
[91a5bcdd] Plots v1.39.0 Info Packages marked with ⌃ have new versions available and may be upgradable.(myProject) pkg> instantiate ... (myProject) pkg> precompile ... julia> exit()
While it is expected that there is no need to precompile as I just did it in the previous session and have not changed anything overall. Note that the expected behavior, i.e.
Plots
just loads without precompilation, occurs when using a command line (or evenvterm
from within Emacs), thus leading me to suspect thatjulia-repl
is somehow messing with the.toml
files? It is increasingly frustrating as my personal package is relatively huge and precompilation takes a significant amount of time.GNU Emacs 28.1
1.9.4
julia-repl
version:Version: 1.3.1
Perhaps it is also useful to paste the relevant part of
config.org