# Unsure how to develop a package in v1.8

**URL:** <https://discourse.julialang.org/t/unsure-how-to-develop-a-package-in-v1-8/95408>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 1, 2023, 9:26pm UTC](https://discourse.julialang.org/t/unsure-how-to-develop-a-package-in-v1-8/95408 "2023-03-01T21:26:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsbryan4](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jsbryan4/32/34173_2.png) [@jsbryan4](https://discourse.julialang.org/u/jsbryan4)\
**Post date:** [March 1, 2023, 9:26pm UTC](https://discourse.julialang.org/t/unsure-how-to-develop-a-package-in-v1-8/95408/1 "2023-03-01T21:26:26Z")

</div>

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

```julia
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

```julia
using Pkg
using Revise
Pkg.develop(path="./BindingInference/")
Pkg.instantiate()
Pkg.resolve()
using BindingInference

```

But I get this error:

```julia
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.

---

<div class="post-metadata">

**Author:** ![ederag](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ederag/32/4106_2.png) [@ederag](https://discourse.julialang.org/u/ederag)\
**Post date:** [March 1, 2023, 9:44pm UTC](https://discourse.julialang.org/t/unsure-how-to-develop-a-package-in-v1-8/95408/2 "2023-03-01T21:44:49Z")

</div>

> ERROR: LoadError: ArgumentError: Package BindingInference does not have Random in its dependencies:

It might be enough to go to the root `BindingInference/` directory where the `Project.toml` resides,  
then in the julia session hit `]` to go to package mode and `add Random`.

This should add that entry to the `Project.toml`.

---

<div class="post-metadata">

**Author:** ![jsbryan4](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jsbryan4/32/34173_2.png) [@jsbryan4](https://discourse.julialang.org/u/jsbryan4)\
**Post date:** [March 1, 2023, 10:10pm UTC](https://discourse.julialang.org/t/unsure-how-to-develop-a-package-in-v1-8/95408/3 "2023-03-01T22:10:57Z")

</div>

This worked for Random, but one of BindingInference’s dependencies is actually another package I am creating called SimpleNamespaces. I tried to add SimpleNamespaces to BindingInference’s dependencies using

```julia
] acvtivate BindingInference/
] add Random
] add SimpleNamespaces

```

But I got this error:

```julia
ERROR: The following package names could not be resolved:
 * SimpleNamespaces (not found in project, manifest or registry)

```

Is it not good practive to develop 2 packages at once? How should I resolve this?

---

<div class="post-metadata">

**Author:** ![ederag](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ederag/32/4106_2.png) [@ederag](https://discourse.julialang.org/u/ederag)\
**Post date:** [March 1, 2023, 10:53pm UTC](https://discourse.julialang.org/t/unsure-how-to-develop-a-package-in-v1-8/95408/4 "2023-03-01T22:53:36Z")

</div>

I’m not fluent with this, but do not see anything wrong with `]dev ../SimpleNamespaces`  
(provided there are no cyclic dependencies)  
When things are ready, release the dependency first, `]free ../SimpleNamespaces` (to remove the dev status), then release the main package ?
