# Pkg3 again

**URL:** <https://discourse.julialang.org/t/pkg3-again/18173>\
**Category:** General Usage\
**Created:** [November 30, 2018, 9:03am UTC](https://discourse.julialang.org/t/pkg3-again/18173 "2018-11-30T09:03:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Pevny](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomas_pevny/32/25466_2.png) [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Post date:** [November 30, 2018, 9:03am UTC](https://discourse.julialang.org/t/pkg3-again/18173/1 "2018-11-30T09:03:10Z")

</div>

Hello All,

I have to admit that I am still totally lost with Pkg3. I just do not understand its internals despite reading docs and watching JuliaCon videos.

My current problem is as follows. I have created an extension of Flux for Multiple-Instance Learning (called Mill [https://github.com/pevnak/Mill.jl](https://github.com/pevnak/Mill.jl)). I have tagged versions in git and in `Project.toml`. In past versions, I have used unregistered package `KissThreads`, but I have removed. This has somehow caused a havoc. Since the `Mill` is not registered, I want to add it as a dependency to my other projects.

The problem is that I receive a following error about unsatisfiable dependency.

```julia
(tmp) pkg> add https://github.com/pevnak/Mill.jl
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/pevnak/Mill.jl`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package KissThreading [36cdf07b]:
 KissThreading [36cdf07b] log:
 ├─KissThreading [36cdf07b] has no known versions!
 └─restricted to versions * by Mill [1d0525e4] — no versions left
   └─Mill [1d0525e4] log:
     ├─possible versions are: 1.1.0 or uninstalled
     └─Mill [1d0525e4] is fixed to version 1.1.0

```

Thanks for an help.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [November 30, 2018, 10:03am UTC](https://discourse.julialang.org/t/pkg3-again/18173/2 "2018-11-30T10:03:22Z")

</div>

> [@Tomas\_Pevny](#):
>
> In past versions, I have used unregistered package `KissThreads` , but I have removed.

It is still there: [https://github.com/pevnak/Mill.jl/blob/f3392f943c8864175a121ea30318560b25c4dbe0/Project.toml#L13](https://github.com/pevnak/Mill.jl/blob/f3392f943c8864175a121ea30318560b25c4dbe0/Project.toml#L13)

---

<div class="post-metadata">

**Author:** ![Tomas\_Pevny](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomas_pevny/32/25466_2.png) [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Post date:** [November 30, 2018, 10:43am UTC](https://discourse.julialang.org/t/pkg3-again/18173/3 "2018-11-30T10:43:08Z")

</div>

Thanks Fredrik,

what is weird is that when I click on tagged version v1.2, than it is not there? I will try to fix this.

---

<div class="post-metadata">

**Author:** ![Tomas\_Pevny](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomas_pevny/32/25466_2.png) [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Post date:** [November 30, 2018, 10:52am UTC](https://discourse.julialang.org/t/pkg3-again/18173/4 "2018-11-30T10:52:03Z")

</div>

Thanks, ti works by now. So the problem was the lack of knowledge of git.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [November 30, 2018, 11:34am UTC](https://discourse.julialang.org/t/pkg3-again/18173/5 "2018-11-30T11:34:25Z")

</div>

Note also that Pkg does not care about the git tags, so when you do `pkg> add url` you will always get the `master` branch. However, you can specify a git reference to checkout after a `#`, so e.g. this works and installs your tagged v1.2 version:

```julia
pkg> add https://github.com/pevnak/Mill.jl#v1.2

```

---

<div class="post-metadata">

**Author:** ![Tomas\_Pevny](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomas_pevny/32/25466_2.png) [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Post date:** [November 30, 2018, 12:08pm UTC](https://discourse.julialang.org/t/pkg3-again/18173/6 "2018-11-30T12:08:56Z")

</div>

Hi Frederik,

thanks for explanation. I have therefore one more question. Does Pkg care about the tag in git or about the tag in Project.toml. What happens, if those two are different?

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [November 30, 2018, 12:23pm UTC](https://discourse.julialang.org/t/pkg3-again/18173/7 "2018-11-30T12:23:18Z")

</div>

> [@Tomas\_Pevny](#):
>
> Does Pkg care about the tag in git or about the tag in Project.toml. What happens, if those two are different?

What matters from the perspective of Pkg is your Project.toml, but the thing that gets put into your Project.toml by Pkg (if you use the URL) depends on what’s in git.

Personally, I do my utmost not to look at either Project.toml or Manifest.toml of I can avoid it, and basically. Use `Pkg.status()` to see what Pkg thinks is there, and definitely never edit it by hand unless absolutely necessary (which it rarely is).

---

<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:** [November 30, 2018, 12:33pm UTC](https://discourse.julialang.org/t/pkg3-again/18173/8 "2018-11-30T12:33:44Z")

</div>

> [@kevbonham](#):
>
> definitely never edit it by hand unless absolutely necessary (which it rarely is)

I don’t think you can avoid it, eg for adding target dependencies. Cf

> <https://github.com/JuliaLang/Pkg.jl/issues/480>
>
> It would be great to have the functionality of #340 exposed in the interactive i…nterface, so that one does not have to manually edit the \`Project.toml\`. Eg something like
> \`\`\`julia
> pkg\> add targets.test SomePackage
> pkg\> rm targets.test SomePackage
> \`\`\`
> or simply \`add test\`.

---

<div class="post-metadata">

**Author:** ![Tomas\_Pevny](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomas_pevny/32/25466_2.png) [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Post date:** [November 30, 2018, 1:19pm UTC](https://discourse.julialang.org/t/pkg3-again/18173/9 "2018-11-30T13:19:34Z")

</div>

Do I understand correctly that version number in `Project.toml` gets populated when I add the repository from github?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [November 30, 2018, 1:53pm UTC](https://discourse.julialang.org/t/pkg3-again/18173/10 "2018-11-30T13:53:53Z")

</div>

> [@Tomas\_Pevny](#):
>
> Does Pkg care about the tag in git or about the tag in Project.toml. What happens, if those two are different?

It does not care about git tags.

> [@Tomas\_Pevny](#):
>
> Do I understand correctly that version number in `Project.toml` gets populated when I add the repository from github?

The version in the project file is only used when a package is in a checked out state (e.g. `dev`ed or if you have added a branch or similar).

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [November 30, 2018, 2:17pm UTC](https://discourse.julialang.org/t/pkg3-again/18173/11 "2018-11-30T14:17:20Z")

</div>

Right, that’s a case where it’s absolutely necessary 😆
