I've got an old Project.toml in a project that I was using in Julia 1.6.5, but now I'm trying to run the project on Julia-1.8.3 and things like Gtk don't compile (probably the version specified in the Project.toml isn't compatible with Julia 1.8.3). Is there a way to say that instead of using the version (UUID) specified in the Project.toml, just go ahead and load up all the latest versions of the dependencies? (what I did was manually go through and add all of the packages in the Project.toml, but I suspect there must be a better way)
A message was moved here from #helpdesk (published) > Why is this not typestable? by Sukera.
what error do you get?
have you tried ]resolve
and ]instantiate
afterwards?
Project.toml doesn't store any versions of a particular instantiation, only the package UUIDs (which identify which package is a dependency) and the compat bounds (which state which versions of a given package a project is compatible with)
or simply ]up
?
Oh, sorry, ended up in the wrong channel or something, I haven't been on here in ages...
It was a compile error of some sort. I was able to get them loaded by manually adding, I'll try the ]resolve and ]instantiate.
Would it be ]activate .
followed by ]resolve
and then `]instantiate'?
yes, you'll have to activate the environment of the project
don't just add all the dependencies to your main/default environment :)
Yeah, when I try that I get a bunch of errors like:
RROR: The following 2 direct dependencies failed to precompile:
Images [916415d5-f1e6-5110-898d-aaa5f9f070e0]
Failed to precompile Images [916415d5-f1e6-5110-898d-aaa5f9f070e0] to /home/phil/.julia/compiled/v1.8/Images/jl_TRVB3o.
ERROR: LoadError: ArgumentError: Package CompilerSupportLibraries_jll does not have Pkg in its dependencies:
can you share the Project.toml and Manifest.toml for that? This shouldn't happen :thinking:
I'm pretty sure it has something to do with a difference in the Project.toml and Manifest.toml since an earlier version of Julia (IIRC 1.6.3 worked for this project.). I removed them and regenerated them and that seemed to work.
Yeah, there's no gaurentees that a manifest can be re-used between julia versions
Nowadays we even warn people if they use a manifest that was generated on a different version for this reason
So do you save the toml files in github (or whatever your version control is)
or do you just regen them every time you move to a new version of Julia?
I only save the Project.toml file to github
The Manifest is only for exact reproducibility, and in that case you want to use it with the same julia version anyways
ah, ok. That's what I did wrong, then.
I'd developed this this package on 1.6, IIRC ( a couple of years ago).
it depends on what the project is for - if you develop an application, saving the Manifest.toml certainly makes sense for reproducibility. For regular packages though, I usually stick to just having Project.toml
Last updated: Nov 22 2024 at 04:41 UTC