JuliaLang / Pkg.jl

Pkg - Package manager for the Julia programming language
https://pkgdocs.julialang.org
Other
609 stars 251 forks source link

Unclear documentation about new workspace feature #3862

Open moble opened 3 months ago

moble commented 3 months ago

I'm very excited about this new workspace feature; it sounds like it could really improve a lot of workflows. I've read the new documentation and the entire thread for the PR that introduced it. But there's something I just don't understand about this new feature, and I suspect @lassepe was getting at this in this comment. Specifically, when users of my package run add CoolPackage will Pkg install and/or restrict versions so that all the dependencies in CoolPackage/test and CoolPackage/docs will/can also be satisfied? Or will add CoolPackage act as though only the top-level project exists, while I'll have to do something else to get this monolithic resolution?

Let's take a hypothetical: My docs will require Plots. But maybe for some reason, that depends on an old version of SomeWeirdPackage package, which is fine when I'm just making plots, but my users really want the newest version of SomeWeirdPackage for some awesome update. Will the workspaces that I set up for my own convenience cause a conflict for them?

KristofferC commented 2 months ago

Specifically, when users of my package run add CoolPackage will Pkg install and/or restrict versions so that all the dependencies in CoolPackage/test and CoolPackage/docs will/can also be satisfied?

No, since CoolPackage is not in your workspace. If a user git cloned CoolPackage and explicitly added it to an active workspace then the workspace of CoolPackage would "become active".