I am trying to create a module called BindingInference that ultimately I would like to use as a Package. I store all the files in a directory structured like
BindingInference/
Project.toml
license, readme, and git stuff...
src/
BindingInference.jl
other files...
tests/
tests...
examples/
example usage/
I would like to be able to use BindingInference as a package as I develop and debug it. To do that I have a script I call main.jl in the same directory as BindingInference/. In main.jl I call BindingInference with
using Pkg
using Revise
Pkg.develop(path="./BindingInference/")
Pkg.instantiate()
Pkg.resolve()
using BindingInference
But I get this error:
ERROR: LoadError: ArgumentError: Package BindingInference does not have Random in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
to ensure all packages in the environment are installed.
- Or, if you have BindingInference checked out for development and have
added Random as a dependency but haven't updated your primary
environment's manifest file, try `Pkg.resolve()`.
Im not sure why I am getting this issue, especially considering that the two suggestions it makes (“Pkg.resolve()” and “Pkg.instantiate()”) are already in my script. Aside from manually entering in the uuid for Random I am not sure how to fix this issue. I want to add that this exact same block of code worked in Julia v1.7, but gives me an error in Julia v1.8. Im not sure why this is.
Backing up, I am not sure that my workflow for developing this package is very good so I want some suggestions. If I want to make a package in Julia is this the right work flow? I just want to be able to import my module and then iterate with editing it and running my scripts without restarting the repl each time.