Skip to content
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

Unique package paths #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

GunnarFarneback
Copy link
Collaborator

@GunnarFarneback GunnarFarneback commented Jun 17, 2020

Fixes #37 as outlined in #37 (comment).

WIP in the absence of tests.

@StefanKarpinski
Copy link
Contributor

Question: is this asymmetrical? I.e. when a new package is added which collides with an existing one, are they both moved to the longer style of path or just the new one? Either is fine, but if this is going to be path dependent anyway (i.e. the order of adding matters), then you could just as well use sequential numbering like @pfitzseb suggested. I.e. the first one in a collision class gets A/APackage/, the next one gets A/Apackage.1/, the next A/apackage.2, etc. The argument for UUIDs was primarily that it could always guarantee non-collision without the path names depending on the details of how the packages were added.

@GunnarFarneback
Copy link
Collaborator Author

Yes, this is asymmetrical. It's more work and gives a more complicated git history to move around existing directories and files.

The advantage of using UUID over sequence numbers anyway is that you have a decent chance to navigate to the right directory if you happen to know the name and the (partial) UUID, e.g. from the Pkg.status output. With sequence number you have no choice but to look it up in Registry.toml (or do a linear search through the directories) unless you happen to know the chronology.

@StefanKarpinski
Copy link
Contributor

Fair enough. Might be good to have an operation to "normalize" the layout of the repo by moving any packages with name collisions to longer directories, but that can be done separately or not at all.

@GunnarFarneback GunnarFarneback changed the title [WIP] Unique package paths Unique package paths Jun 29, 2020
@GunnarFarneback GunnarFarneback mentioned this pull request Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Folder cases
2 participants