Pkg.jl: add Package --strict

Created on 7 Mar 2019  路  6Comments  路  Source: JuliaLang/Pkg.jl

... which doesn't update anything and strictly only adds Package.

This will solve the problem, that it can currently take ~ 100s to add a single, 100 LOC package with no dependencies, when many packages are installed and update wasn't called in some time!

API feature request

Most helpful comment

Yep, that's right. I can have this in by the next minor Julia release. All the utility functions are already in place, it's mostly just a matter of hooking the REPL in.

All 6 comments

This should just be the default behavior. The desirable behavior is that add should only change things that it must change in order to add the requested packages. However, being able to do "only change what you must" requires a new resolver鈥攖he current one cannot do this, it only understands "fixed" or "not fixed", there is no "preferably fixed".

So this is a bigger project then?

Would pinning all previously added packages be a temporary solution?

No, implementing this is fairly straightforward. We already do it internally for develop. The resolver will try to add a new package without altering existing dependencies.

What requires a new resolver is the case where an update is necessary in order to add a new package. In that case, we want to do a "minimal update", which we can't do without a new resolver.

Fixing this for the case where no update is needed would already be a big improvement! ;)

Right, that's what I meant. What we can do, I guess, is try to resolve with everything pinned and if that fails try again with things unpinned. Is that what you're thinking of, @00vareladavid?

Yep, that's right. I can have this in by the next minor Julia release. All the utility functions are already in place, it's mostly just a matter of hooking the REPL in.

Was this page helpful?
0 / 5 - 0 ratings