-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Namespacing packages #924
Comments
There's been scattered discussion over the years but I don't recall where offhand. multilib packages seem to cover a number of the cases here, and there's already ad-hoc namespacing-by-prefix conventions that handle grouping. Technically, it seems like the work that would need to be done would be to enable (3) -- and I'm not sure exactly what that would entail (someone would then need to set up which namespace to pull from, etc., which seems more complicated if anything than something resembling what we have now). I think that maybe something in cabal.project files or similar that allowed specification of global package overrides (as an extension of the backpack stuff perhaps?) would be the most direct way to get (3), and that doesn't seem to require any technical changes in terms of namespacing. That is to say, namespacing seems to be 90% a convention issue, not a technical issue, and I'm not sure what technical changes it would make sense to implement to support any particular convention, and of those changes, I think they might be best thought of more generally than involving namespacing anyway... |
Multilib packages don't really replace the grouping of similar packages under the same namespace as versioning is more difficult for them (you can't change version only for a single package, you need to bump versions for all packages even when changing only a single public library). But I see a huge benefit in lightweight forking of Haskell packages and first-class support of packages by build tools and package repositories. In the end, almost all Haskell packages are run by volunteers in their free time. Volunteers tend to burn out and free time is a limited resource. The Haskell stability group has several proposals to deal with this. But I think that adding a simple way to fork an existing package will enable successors to easily continue bringing improvements to existing projects and users to easily switch to them. Thus being said, Hackage already kinda allows this as @gbaz mentioned. You can fork a GitHub repository of an existing package and upload it to Hackage under a custom name. For example, I can make my own version of In the end, I always found the package takeover procedure hostile to package maintainers. I'll gladly ditch the takeover in favour of forking or a better collaboration and stability approach. I'm even okay with ugly package names if such naming practices would be publicly documented on hackage.haskell.org, announced and generally encouraged. There's also Flora Package Index that introduces Haskell packages with namespaces externally to Hackage: |
I think the issue of allowing easier forking is orthogonal to namespacing. It would be allowing a mechanism external to hackage whereby a user can say "throughout the entire calculation of a build-plan, substitute AAA-with-any-version-bounds by BBB-with-these-version-bounds" I think this could be done via an extension to cabal.project files. |
The drawback here is that Ultimately, what we want here are not individual technical solutions, imo, but a workflow: Right now:
A better workflow would be:
I think the problem is exactly that we have too much individual tooling solutions, but barely anything built around "workflows". |
There is no guarantee that Needing to fork a package is a social problem, switching the ecosystem to use another library is also partly a social problem. But there are clearly indicators that we are capable to, e.g. As there is no way to ensure that Namespacing is a solution so you can |
... and namespacing is a very heavy feature technically to introduce today. GHC knows and cares about package names, to begin with. |
There doesn't need to be. Github also doesn't make any attempt in figuring out if the code is anywhere close between forks. It just marks the origin of the package: there was an intersection of code at some point in the past. And hackage UI would even be able to show which version this was. |
It sounds like the main motivation here is just visibility on hackage of forks and I don't thank "namespacing" addresses that either. It only addresses letting you say "foo/pkg" instead of "foo-pkg". Visibility of forks lets another user mark their package on hackage as a fork of mine, which to active-maintainers could feel even more hostile than a fork today, since its turning my package page into free advertising for someone else's package! "other users can easily see the fork and use it directly from hackage without any additional tooling" already exists today, it just doesn't link to the forks from the original. What this doesn't address that a cabal.project solution does is if I want to use pervasively in all my dependencies "bytestring-forked" instead of "bytestring". The cabal project solution would essentially be sugar for having a local overlay and with the "substitute" package locally renamed to the "original". |
Not quite. This is not true for
That's quite an odd argument, given that github does the same and is one of the most collaborative platforms.
I don't think so. Forks today can have any sort of naming scheme, including completely different names. As soon as we provide a fork button, there will be a network effect, similar to github. Yes, you can manually fork packages with whatever name you please on github as well, but most people use the fork button, which improves visibility. |
Has there been any thought given to namespacing packages, i.e. listed under an organisation or user. For example
servant/client
andservant/server
rather than everything living in a global namespace?No idea about
but it could be helpful with
The text was updated successfully, but these errors were encountered: