# Developping non registered packages: should I always do dev package?

**URL:** <https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013>\
**Category:** General Usage\
**Tags:** pkg\
**Created:** [December 8, 2019, 2:28pm UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013 "2019-12-08T14:28:29Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [December 8, 2019, 2:28pm UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013/1 "2019-12-08T14:28:29Z")

</div>

Hello everyone,

I have a few questions regarding the use of Pkg. I know there are some other threads with similar titles but I could not really find a clear answer to my questions.  
It’s also hard to make a MWE, since my questions are more about good practices than really coding.

Here it goes:

1. Lets say I have my non registered package A that depends on my non registered package B.  
I have a few options:  
a) I can decide not to add B to the environment of A. I can do everything I want if I work purely on my local machine.  
b) I want to have packages A and B on github (or gitlab) to share them with my colleagues. To avoid warnings I add github/omerchiers/B.jl to the enivronment of A.  
Here comes my first problem. If I just add B to A, then the version of B will be fixed. That’s fine for my colleagues, but I want to continue developping B normally. I could dev B, but I don’t want that for my colleagues. Which choice should I make? I guess I misunderstand something from the hole process.  
It seems to be recommended (juliacon2019 presentation by Kristoffer Carlsson on Pkg) to systematically dev your local packages under development. Is dev a purely local command? Or is it somehow also reflected in project.toml that appears on Github?  
c) I usually keep my own packages in a well defined place, not .julia/dev. If I do dev B, how can I avoid it to be copied to .julia/dev?

2. It seems that Project.toml should always be committed in the repo. Is this also true for Manifest.toml?

3. I give version tags to my commits. project.toml doesn’t seem to take this into. How can I put a version tag in Project.toml? By hand editing? Or is there a command for that?

That’s about it for now.  
Thanks in advance,  
Olivier

---

<div class="post-metadata">

**Author:** ![findmyway](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/findmyway/32/4946_2.png) [@findmyway](https://discourse.julialang.org/u/findmyway)\
**Post date:** [December 8, 2019, 4:17pm UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013/2 "2019-12-08T16:17:52Z")

</div>

> [@Olivier\_Merchiers](#):
>
> I want to have packages A and B on github (or gitlab) to share them with my colleagues.

For unregistered packages, I would suggest creating a registry and your colleagues only need to [add that registry](https://julialang.github.io/Pkg.jl/v1.1/registries/#Managing-registries-1). And you can find many other discussions [here](https://discourse.julialang.org/t/creating-a-registry/12094/14) and [on Registrator.jl](https://github.com/JuliaRegistries/Registrator.jl/issues/39)

> [@Olivier\_Merchiers](#):
>
> Is dev a purely local command?

Yes, only local. Unless you commit and push your changes to github…

> [@Olivier\_Merchiers](#):
>
> If I do dev B, how can I avoid it to be copied to .julia/dev?

Then consider making a temp dir and activate that environment. Then it will not affect `.jlia/dev`. By the way, I remember that `dev B` will not copy B into .julia/dev. Correct me if I’m wrong.

> [@Olivier\_Merchiers](#):
>
> Is this also true for Manifest.toml?

No. But for projects (instead of packages), the Manifest.toml file do help to reproducibility.

> [@Olivier\_Merchiers](#):
>
> I give version tags to my commits. project.toml doesn’t seem to take this into. How can I put a version tag in Project.toml? By hand editing? Or is there a command for that?

The tag info will appear in Manifest.toml but not Project.toml.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 9, 2019, 7:45am UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013/3 "2019-12-09T07:45:03Z")

</div>

This is an outstanding issue, see

[https://github.com/JuliaLang/Pkg.jl/issues/492](https://github.com/JuliaLang/Pkg.jl/issues/492)

and the related discussions.

If `A` is an “application”, you can just commit the manifest and instantiate. If it is a package, then your best current option is registering it, or running a private registry.

---

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [December 9, 2019, 9:22am UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013/4 "2019-12-09T09:22:38Z")

</div>

Thanks a lot for your answers.

> For unregistered packages, I would suggest creating a registry and your colleagues only need to [add that registry](https://julialang.github.io/Pkg.jl/v1.1/registries/#Managing-registries-1). And you can find many other discussions [here](https://discourse.julialang.org/t/creating-a-registry/12094/14) and [on Registrator.jl](https://github.com/JuliaRegistries/Registrator.jl/issues/39)

I never looked into registries. I will see how hard that is.

> Yes, only local. Unless you commit and push your changes to github…

I’m sorry, I’m not sure if I fully understand. Can you give some more details?

> The tag info will appear in Manifest.toml but not Project.toml.

Yes indeed. I just saw that. But the tags in Manifest.toml seems to be stuck on 0.1.0.  
Somehow for my unregistered package I cannot do [https://github/omerchiers/MyPackage.jl@v0.2](https://github/omerchiers/MyPackage.jl@v0.2)  
I have to put the commit SHA1 even though I pushed my tags to github.

thanks again for your time.  
Olivier

---

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [December 9, 2019, 9:23am UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013/5 "2019-12-09T09:23:03Z")

</div>

Thanks for pointing this out.

Best,  
Olivier

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [December 9, 2019, 10:14am UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013/6 "2019-12-09T10:14:51Z")

</div>

> [@Olivier\_Merchiers](#):
>
> I never looked into registries. I will see how hard that is.

FWIW, you could take a look at the [notes](https://github.com/crstnbr/TrebstRegistry/blob/master/custom_registry.md) I took when creating a custom registry the other day.

---

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [December 9, 2019, 10:26am UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013/7 "2019-12-09T10:26:24Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![findmyway](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/findmyway/32/4946_2.png) [@findmyway](https://discourse.julialang.org/u/findmyway)\
**Post date:** [December 9, 2019, 4:04pm UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013/8 "2019-12-09T16:04:23Z")

</div>

> [@Olivier\_Merchiers](#):
>
> I’m sorry, I’m not sure if I fully understand. Can you give some more details?

Here I mean that, by `] dev X`, you can modify everything about that package on your local computer. But nothing will be updated to your remote github automatically. Unless you manually `cd /path/to/X && git add . && git commit -m "notes" && git push` 😆

> [@Olivier\_Merchiers](#):
>
> Somehow for my unregistered package I cannot do [https://github/omerchiers/MyPackage.jl@v0.2](https://github/omerchiers/MyPackage.jl@v0.2)  
> I have to put the commit SHA1 even though I pushed my tags to github.

Yes, that’s true. I remember that there used to be a discussion about it but I can’t find it right now. (One argument is that the tag on github can be changed to point to a different commit, which hurts the reproducibility)

---

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [December 9, 2019, 4:34pm UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013/9 "2019-12-09T16:34:01Z")

</div>

> [@findmyway](#):
>
> Here I mean that, by `] dev X`, you can modify everything about that package on your local computer. But nothing will be updated to your remote github automatically. Unless you manually `cd /path/to/X && git add . && git commit -m "notes" && git push` 😆

😅 yeah sorry, I should have gotten that

> [@findmyway](#):
>
> Yes, that’s true. I remember that there used to be a discussion about it but I can’t find it right now. (One argument is that the tag on github can be changed to point to a different commit, which hurts the reproducibility)

oh I see. If I find it, I’ll post it here.  
Thanks again!

---

<div class="post-metadata">

**Author:** ![Olivier\_Merchiers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivier_merchiers/32/4073_2.png) [@Olivier\_Merchiers](https://discourse.julialang.org/u/Olivier_Merchiers)\
**Post date:** [December 10, 2019, 2:11pm UTC](https://discourse.julialang.org/t/developping-non-registered-packages-should-i-always-do-dev-package/32013/10 "2019-12-10T14:11:31Z")

</div>

> Yes, that’s true. I remember that there used to be a discussion about it but I can’t find it right now. (One argument is that the tag on github can be changed to point to a different commit, which hurts the reproducibility)

Maybe you were thinking of this thread?

> [@Pkg add 'at' or 'trackto' / @ or #](https://discourse.julialang.org/t/pkg-add-at-or-trackto-or/12270):
>
> I don’t want to disturb too much for the development of Pkg3. I know you are quite busy. Nevertheless, I find a bit misleading that @ is used to pin a tagged commit of the package but a SHA hash cannot be used instead of the tag. [Documentation: Pkg → Adding registered packages](https://docs.julialang.org/en/latest/stdlib/Pkg/#Adding-registered-packages-1). Indeed one can pin the commit by using # which is supposed to track what’s next to it. It makes sense for a branch. Does it make for a commit? Maybe I’m missing something. Besides, in the documentation seems that using…
