Pkg.add with a URL

Is there some reason why we have to do


instead of


? Couldn’t this conversion happen inside add?

PackageSpec allows encapsulating more information i.e. branches, commits etc. I believe a method for just the link is too little and programatically is not a big deal adding the wrapper around.

We can do


Surely it wouldn’t be a big deal to do the parsing inside the add function?

Its an architectural choice … Modularity and flexibility are improved by keeping parsers outside the add; this allows for a multitude of pkg add formats (i.e. a complicated parser) while simplifying the add functions code (at least in theory :wink: ):


  pkg> add Example
  pkg> add Example@0.5
  pkg> add Example#master
  pkg> add Example#c37b675
  pkg> add
  pkg> add
  pkg> add Example=7876af07-990d-54b4-ab0e-23690620f79a

It would be a pretty big deal.

But with you will (if we merge it) be able to write

Pkg.add(url = "http:...")

which is a bit more convenient.


I see. Fair enough. Thanks.