-
Notifications
You must be signed in to change notification settings - Fork 11
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
Folder cases #37
Comments
Are we handling the case for packages with the exact same name? In general it might make sense to change the whole directory structure from |
The folder name 'AA2' is not that great if someone later wants to register a package called 'AA2'. If we want to disambiguate, the obvious way would be to involve the uuid. For this particular case I think it's more a question about registry policy. Registration of "SAMtools" when "SAMTools" already exists is an extreme case of typo-squatting and should just not be allowed. Assuming that it was intended to be a name change, that should have been done with a custom PR that changed folder names rather than a new registration, if we want to allow name changes in the first place. |
It was actually two different packages with different authors, but yea, we need a policy for that. But RegistryTools still need to make this work regardless. |
There is also the option to flat out refuse case insensitivity collisions, which is probably the quickest place to start. |
Right, but that seems more of a registry-specific policy. This issue is about the fact that the tooling should do something better. |
Is the concern that this can't be faithfully unpacked on a case-insensitive filesystem? If so, this is just a generalization of the problem of name collisions where two packages with the same name aside from case are a collision on some systems. We may as well figure out how to support exact name collisions while we're at it. My first guess would be to use some or all of the UUID as a slug value and do
I kind of like the last one. |
Eh, sorry. My original version of this had the slug first then the name, but then I realized that a lot of the slug choices don't work for that since the slug directory is top-level, so I changed the ordering, which works for exact name collisions but not for inexact case collisions—which version of the name to you choose? For case collisions, you want the slug first and the name after so that each one can have it's own folder. Alternately: don't use a More musing:
That only leaves two viable options:
If we went with the second option, the total path would be |
Well,
would of course also work and be stable (as already kinda suggested by Fredrik above). That said, I think I'd prefer |
I think the name of the folder should match the name of the package and not be made lowercase (we don't lowercase everything in the case of non-collisions). Auto-incrementing when a collision is detected makes this stateful: it matters what order packages were added. That seems like it's not entirely ideal. If we do
|
Yes, some users got errors this morning which triggered this issue: https://discourse.julialang.org/t/persistently-dirty-registry-case-insensitive-file-collision-when-cloning-juliaregistries-general-from-github/41577/7, JuliaRegistries/General#16501 |
I saw that after asking. Thanks for clarifying. |
I'm not at all concerned about statefulness but see a significant value in easy navigation. I also don't think collisions will be very frequent and that the unique case should be as unencumbered and space-saving as possible. I think the |
To be clear, when there are no name collisions, I think we should keep the same layout as we currently have, i.e. just |
How much interest is there in this functionality? I could rebase #38 if someone is sufficiently interested and willing to review it. |
I think we will inevitably need this at some point, so 👍🏻 |
If there is a package
Aa
in the registry, and you register a packageAA
, then the folders needs to be e.g.AA2
and not `AA, see JuliaRegistries/General#16341.The text was updated successfully, but these errors were encountered: