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

Make package ID and version comparison case insensitive #2522

Closed
6 of 7 tasks
joelverhagen opened this issue Apr 11, 2016 · 4 comments
Closed
6 of 7 tasks

Make package ID and version comparison case insensitive #2522

joelverhagen opened this issue Apr 11, 2016 · 4 comments
Assignees
Labels
Type:DCR Design Change Request
Milestone

Comments

@joelverhagen
Copy link
Member

joelverhagen commented Apr 11, 2016

The server already does this and version comparison in memory is case insensitive. We've also done a pretty good job about making ID comparison in memory a case insensitive operation.

However, there are places where ID comparisons are case sensitive. Namely, code that interacts with the file system. For example, when a local source is a directory of .nupkgs, the ID comparisons are case sensitive.

The plan forward here is:

  • Add a property to the project.lock.json file so that each package libraries (under the libraries node) has a path. The value of this property should be {id}/{version} component of a path which can be used along with the global packages folder to get the absolute path to package assets.
  • Add a switch to NuGet to support restoring the original ID and version format. This is for backwards compatibility (with Add --legacy-packages-directory to Xplat restore NuGet.Client#814).
  • Update the .NET CLI to write this property to the .deps.json file.
  • Update the .NET CLI to write "hashPath" to the .deps.json file.
  • Update the DotNetHost to prefer the path property over the concatenation of ID and version when reading the .deps.json file and use the "hashPath" property when available.
  • Revert the hack which always lowercases the package ID and version in the .deps.json file.
  • Work with owners of DOTNET_HOSTING_OPTIMIZATION_CACHE to ensure the new cache is built with the proper format.
@joelverhagen
Copy link
Member Author

Related: #2383

@joelverhagen
Copy link
Member Author

@yishaigalatzer, we should consider this for CLI RTM since it would necessitate a major change to the global packages folder -- making all IDs and versions lowercase. This change could be breaking in some Mac and Linux scenarios and would necessitate that packages are downloaded or fetched from the HTTP cache again.

@yishaigalatzer
Copy link

That's a pretty major breaking change. I would first try to find an alternative but if we can't we should have an urgent design meeting with the CLI folks

@rrelyea rrelyea added this to the 3.5 RC milestone Apr 19, 2016
@rrelyea rrelyea added the Type:DCR Design Change Request label Apr 19, 2016
@joelverhagen joelverhagen modified the milestones: 3.6 Beta1, 3.6 Beta2 Sep 8, 2016
@joelverhagen
Copy link
Member Author

My work is done here. The last open item on the checklist mentioned above is owned by ASP.NET team (@troydai) .

troydai added a commit to aspnet/BuildTools that referenced this issue Sep 21, 2016
Ensure the paths of the assets and hash files in the package cache are in
correct cases. This change accommodate this change on NuGet side:

NuGet/Home#2522
troydai added a commit to aspnet/BuildTools that referenced this issue Sep 23, 2016
Ensure the paths of the assets and hash files in the package cache are in
correct cases. This change accommodate this change on NuGet side:

NuGet/Home#2522
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

3 participants