Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep getting Manifest.toml not found error #67

Open
biona001 opened this issue Jun 1, 2020 · 6 comments
Open

Keep getting Manifest.toml not found error #67

biona001 opened this issue Jun 1, 2020 · 6 comments

Comments

@biona001
Copy link

biona001 commented Jun 1, 2020

Hello,

For some reason JLSO.jl keeps trying to update my package's Manifest.toml file when I save my custom type. The line that throws this error is:

endswith(outfile, ".jlso") && JLSO.save(outfile, :compressed_Hunique => compressed_Hunique, format=:julia_serialize, compression=:gzip)

and the error message is:

SystemError: opening file "/Users/biona001/.julia/dev/MendelImpute/Manifest.toml": No such file or directory

Unfortunately, my custom type is pretty complicated to generate and simpler examples don't lead to this error. As far as I understand, this should be happening only when I try to read in an old JLSO format? Is there some way to bypass this?

Alternatively, if there's some tutorial on how to generate and manage a Manifest.toml file for my own package, that would be very helpful as well.

@rofinn
Copy link
Member

rofinn commented Jun 1, 2020

Is there a full traceback? Can you confirm that the Manifest.toml file exists? JLSO will also read the active project manifest when saving files, this is how we retain a record of the software state when you saved your data. If for whatever reason the Manifest.toml location is incorrect then we need to fix that.

https://github.com/invenia/JLSO.jl/blob/master/src/metadata.jl#L39

@biona001
Copy link
Author

biona001 commented Jun 1, 2020

I see. The path it checks is correct. So basically I need to generate a Manifest.toml file for my package? Most of my packages don't have one and for the few that do, I don't remember how they were generated. I guess I can figure that out. Thanks!

@biona001 biona001 closed this as completed Jun 1, 2020
@rofinn
Copy link
Member

rofinn commented Jun 1, 2020

Typically, if you start Julia with julia --project=. it'll activate a local environment in your current working directory. You can then add only the packages you need for the project and they should be saved in a local Manifest.toml file by default. This is generally recommended as it'll provide a cleaner environment for tracking software dependencies for you data files. I suppose we could include that suggestion the docs.

@oxinabox
Copy link
Member

oxinabox commented Jun 1, 2020

I don't see why we are not picking up the global Manifest in this case?
Seems like a bug.

@oxinabox oxinabox reopened this Jun 1, 2020
@rofinn
Copy link
Member

rofinn commented Jun 1, 2020

Would it be a bug with JLSO though? This is all we're doing joinpath(dirname(Base.active_project()), "Manifest.toml").

@rofinn rofinn changed the title Keep getting "Menifest.toml not found" error Keep getting Manifest.toml not found error Jun 1, 2020
@oxinabox
Copy link
Member

oxinabox commented Jun 2, 2020

Unclear, but something weird is going on, because that should work on the global enviroment, and in packages without a Manifest.toml.
Like I don't know how it is possible to have this happen when JLSO is loaded.
Since a Manifest needs to be created to install it.

All I cna thing is one could be via loading JLSO, then doing ] activate DirectoryThatDoesNotExist.
Or maybe doing something like manipulating the LOAD_PATH directly rather than using Pkg to activate projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants