# Pkg3 plan and status

**URL:** https://discourse.julialang.org/t/pkg3-plan-and-status/9763
**Category:** Internals & Design
**Created:** [March 16, 2018, 8:27pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763 "2018-03-16T20:27:01Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![tpoisot](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tpoisot/32/19812_2.png) [@tpoisot](https://discourse.julialang.org/u/tpoisot)
#### Post date: [March 24, 2018, 1:34pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/21 "2018-03-24T13:34:50Z")

</div>

Good point – thanks!

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [March 24, 2018, 2:07pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/22 "2018-03-24T14:07:32Z")

</div>

Seems like having a `bin` directory inside the project and put them in there would work. Did you want any functionality beyond that?

---

<div class="post-metadata">

### Author: ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)
#### Post date: [March 24, 2018, 8:18pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/23 "2018-03-24T20:18:33Z")

</div>

Would be awesome if github would support the Julia dependency graph for Pkg3

> [@Tell GitHub to add Julia dependencies](https://discourse.julialang.org/t/tell-github-to-add-julia-dependecies/6691):
>
> GitHub has a feature to display dependencies for a repo (mainly for JavaScript and Ruby) [https://help.github.com/articles/listing-the-packages-that-a-repository-depends-on](https://help.github.com/articles/listing-the-packages-that-a-repository-depends-on) It works by checking a json file or gemfile. So I sent Github a message saying that it should be easily possible for them to also check the [REQUIRE](https://docs.julialang.org/en/stable/manual/packages/#Requirements-Specification) file for Julia packages for dependencies. They responded by saying they have forwarded this request to their team, but cannot guarantee anything. So if you are also interested i…

---

<div class="post-metadata">

### Author: ![ssfrr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ssfrr/32/3736_2.png) [@ssfrr](https://discourse.julialang.org/u/ssfrr)
#### Post date: [March 24, 2018, 10:19pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/24 "2018-03-24T22:19:29Z")

</div>

> [@StefanKarpinski](#):
>
> Seems like having a bin directory inside the project and put them in there would work. Did you want any functionality beyond that?

There are two orthogonal questions here:

1. How does a package author indicate that their package includes some command-line tool
2. What does Pkg3 do with such tools

For (1), it seems like either considering any julia files in `MyPkg/bin` to be such tools would be reasonable, or having it be a field in the Project.toml

For (2), one option would be to symlink/copy them into some `bin` folder in the Depot, (which presumably the user could add to their `PATH`). Another option would be to put it directly in `/usr/local/bin`, or some other folder that’s already on the path. The former option has the nice property that it’s cross-platform.

Both have the problem that you might have multiple different versions of a given package, so it’s not clear which should get its tools installed. Maybe there would be a separate pkg task that would install any tools for a given package.

---

<div class="post-metadata">

### Author: ![jballanc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jballanc/32/328_2.png) [@jballanc](https://discourse.julialang.org/u/jballanc)
#### Post date: [March 25, 2018, 1:51am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/25 "2018-03-25T01:51:40Z")

</div>

I’d suggest a third option for (2): an executable (or `julia` switch) that dynamically alters the binary load-path in a platform-specific way such that executables stored in packages can be accessed. e.g. This is the `bundle exec` model for Ruby. Alternatively, we could also go full-on virtual env style, and just require that a Julia environment be “activated” before packaged binaries would work.

---

<div class="post-metadata">

### Author: ![Diego\_Javier\_Zea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/diego_javier_zea/32/1858_2.png) [@Diego\_Javier\_Zea](https://discourse.julialang.org/u/Diego_Javier_Zea)
#### Post date: [March 26, 2018, 4:14pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/26 "2018-03-26T16:14:11Z")

</div>

I actually have a script folder with the scripts inside. But, I think that It could be not so easy for non-programmer users to access them. Python’s setuptools automatically includes packages’ scripts in an executable path (e.g. `/usr/local/bin` using Ubuntu). Having something similar in Julia could be great. The tricky part is to support different OS and also different Julia and Julia’s package versions at the same time…

---

<div class="post-metadata">

### Author: ![fp4code](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fp4code/32/3083_2.png) [@fp4code](https://discourse.julialang.org/u/fp4code)
#### Post date: [March 27, 2018, 2:16pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/27 "2018-03-27T14:16:38Z")

</div>

Following the doc, from directory `~/Z` I have created directory `HelloWorld` using command `pkg> generate HelloWorld`.  
First (small) problem, `import HelloWorld` is complaining “Module not found”. Doc needs improvement.  
Second (worst) problem, when `JULIA_LOAD_PATH` environment variable is defined (here as `/home/lambda/Z`), packages are installed in `julia-install-path/usr/local` instead of `~/.julia/packages`:

```julia
pkg> add JSON
 Resolving package versions...
Downloaded JSON ─ v0.17.1
  Updating `/local/prog/julia-master/julia/usr/local/share/julia/site/v0.7`
 [682c06a0] + JSON v0.17.1
ERROR: SystemError (with /local/prog/julia-master/julia/usr/local): mkdir: Permission denied

```

My install is today fresh. What did I forget?

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [March 27, 2018, 2:33pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/28 "2018-03-27T14:33:00Z")

</div>

> [@fp4code](#):
>
> First (small) problem, import HelloWorld is complaining “Module not found”. Doc needs improvement.

Did you cd into the directory (like the docs say) ? This will be clearer soon since the repl prompt will show the name of the project you are currently in.

---

<div class="post-metadata">

### Author: ![fp4code](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fp4code/32/3083_2.png) [@fp4code](https://discourse.julialang.org/u/fp4code)
#### Post date: [March 27, 2018, 3:36pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/29 "2018-03-27T15:36:48Z")

</div>

Thanks Kristoffer, you solved my problem. I don’t need anymore to set `JULIA_LOAD_PATH`. I’m not immediatly concerned by the second problem. Is it a bug or a feature?

---

<div class="post-metadata">

### Author: ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)
#### Post date: [March 29, 2018, 9:04pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/30 "2018-03-29T21:04:36Z")

</div>

What do package developers have to do to add support for Pkg3? Some guidelines about what files must be added/changed in currently existing package repositories would probably speed up the transition.

Reading the documentation in the Julia manual, I think I could try generate a new package for Pkg3 (with the .toml files, etc.), and copy the files of the package that was created for Pkg2 into the new folder, but I’m not sure if that’s the right way to proceed.

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [March 29, 2018, 9:08pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/31 "2018-03-29T21:08:52Z")

</div>

You will only need to add a Project.toml file but we will try to make PRs to registered packages to do this and some tool in Pkg3 to upgrade the package.

---

<div class="post-metadata">

### Author: ![Nosferican](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nosferican/32/9275_2.png) [@Nosferican](https://discourse.julialang.org/u/Nosferican)
#### Post date: [March 30, 2018, 3:05am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/32 "2018-03-30T03:05:40Z")

</div>

I had an issue with including a `Project.toml` file with dependencies in Pkg2. It would break my package as it would not find the dependencies. I am in process of registering it with Metadata and will upgrade it at a later stage.

---

<div class="post-metadata">

### Author: ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)
#### Post date: [March 30, 2018, 1:56pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/33 "2018-03-30T13:56:51Z")

</div>

My pull request in `Pkg3` provides the `pkgsearch` functionality that finds all dependencies of packages using the new metadata. However, nobody has reviewed my PR yet, but the feature exists on my branch.

---

<div class="post-metadata">

### Author: ![Liso](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@Liso](https://discourse.julialang.org/u/Liso)
#### Post date: [April 2, 2018, 10:18am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/34 "2018-04-02T10:18:05Z")

</div>

I added next comment to [26680 issue](https://github.com/JuliaLang/julia/issues/26680):

_‘Maybe Tk has to be removed from official repository and Pkg3/Pkg has to inform about this “banning” process and propose to uninstall it.’_

Maybe will not agree about Tk, but possibility to warn and remove dangerous packages in the future could be nice feature.

What do you think?

PS. BTW @quinnj closed this issue as something which doesn’t belong to Julia itself, but I am afraid we have not to underestimate security problems like this.

---

<div class="post-metadata">

### Author: ![Nosferican](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nosferican/32/9275_2.png) [@Nosferican](https://discourse.julialang.org/u/Nosferican)
#### Post date: [April 4, 2018, 8:25am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/35 "2018-04-04T08:25:48Z")

</div>

Would be nice to have a `Pkg.sessioninfo()`. I posted my temporary solution [here](https://discourse.julialang.org/t/sessioninfo-in-julia/10151).

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [April 4, 2018, 8:30am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/36 "2018-04-04T08:30:01Z")

</div>

The Pkg3 Manifest.toml file contains all packages for the project and what versions they are installed at. And if someone gives you a Project.toml + Manifest.toml you can “instantiate” that exact environment.

---

<div class="post-metadata">

### Author: ![Nosferican](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nosferican/32/9275_2.png) [@Nosferican](https://discourse.julialang.org/u/Nosferican)
#### Post date: [April 4, 2018, 8:50am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/37 "2018-04-04T08:50:51Z")

</div>

Pkg3 Project + Manifest give you the environment of the project, but it might be nice to have a way to report the information of the session at that instance. For example, before loading a package vs after loading all packages. One practicality would be not having to have a sanitized project environment for a short piece of code that only depends on a couple of packages while working on a project with several dozen that may be irrelevant for that particular piece of code. I believe those are two related, but different solutions (e.g., R’s `sessionInfo` vs `packrat`).

---

<div class="post-metadata">

### Author: ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)
#### Post date: [April 6, 2018, 5:09pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/38 "2018-04-06T17:09:49Z")

</div>

I just had the case that I was editing the installed `SHA` package and my edits did not change anything. Then I found out that `SHA` was added to `stdlib`. Will Pkg3 allow a local package to take priority over one from `stdlib`?

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [April 6, 2018, 5:18pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/39 "2018-04-06T17:18:27Z")

</div>

This is more a matter of how Julia itself is built and loads code, not the package manager. Currently you cannot change the version of stdlib packages but in future versions of Julia you will. (As I wrote [above](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/18).)

---

<div class="post-metadata">

### Author: ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)
#### Post date: [April 6, 2018, 5:44pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/40 "2018-04-06T17:44:01Z")

</div>

what if there is no version of stdlib without SHA?

[Previous page](https://discourse.julialang.org/t/pkg3-plan-and-status/9763.md?page=1)

[Next page](https://discourse.julialang.org/t/pkg3-plan-and-status/9763.md?page=3)
