SE-0292 (2nd review): Package Registry Service

Overall I'm pretty happy with how this effort is shaping up. I would like to suggest though, to leave out the global registry configuration.

My reasoning for this is threefold: Firstly, I share the reservations others have expressed that it would become an expectation to have that global registry configured to github, or packages might fail to build.

Secondly, it's an additive change. If we leave out the global configuration now, and find such a mechanism is needed in real-world usage, we can introduce it in the future without breaking anything.

Finally, it violates an ideal that has been expressed as a goal for spm multiple times: As far as feasible, a package should describe the information needed to build it in its manifest/other package files, with no external configuration or setup. I think asking package maintainers to set up a default registry per package is not that big of an ask.

For these reasons, I think leaving out the global registry concept for now would be a good move.

Anecdotally, CocoaPods also started support for custom sources with the pod repo-add (if memory serves) command, but switched to declaring sources in the Podfile later.

And, as a last footnote, and then I really must be going: If global configuration is included after all, it really should not go into ~/.swiftpm, but in the platform-appropriate directories ($XDG_CONFIG_DIR on linux, probably somewhere in ~/Library on mac, and I'm not sure about win :D).

4 Likes