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

Store Id of package versions in DB #1322

Closed
bhuvak opened this issue Jul 15, 2013 · 3 comments
Closed

Store Id of package versions in DB #1322

bhuvak opened this issue Jul 15, 2013 · 3 comments

Comments

@bhuvak
Copy link
Contributor

bhuvak commented Jul 15, 2013

Package versions with different casing fail to work in a case sensitive system. Below is a repro of the issue from Jeff and more details around it can be found here @ Particular/NServiceBus#1271

  1. New Console Application
  2. PMC: install-package nservicebus.structuremap
  3. Enable NuGet Package Restore on the solution
  4. Close VS

At this stage, I have the following:

• packages.config: "NServiceBus.Structuremap"
• csproj: ..\packages\NServiceBus.Structuremap.4.0.0.1...
• packages folder: "NServiceBus.Structuremap.4.0.0.1"

But, now with a few more steps it will be broken:

  1. Delete the packages folder
  2. Reopen the solution
  3. Build (which does package restore)

At this point, only one things changes and that's the packages folder. It's now "NServiceBus.StructureMap.4.0.0.1."

However, if between steps 2 and 3, you were to have cleared your NuGet package cache, then this would no longer repro.

Root cause: When installing a package from cache, we don't have the server's casing of the package Id; instead, we rely on the casing from the nupkg file stored in cache.

If the nupkg has different casing from what the server had when the package was installed, then you'll end up in the mismatch.

That means that if we change the casing of the package, it will fix the current version, but it will break any past versions where the nupkg had the incorrect casing. It looks like that would only be the first 2 versions of this package.

@analogrelay
Copy link
Contributor

Makes sense. We should store the "current" ID in PackageRegistrations (as a cache for display purposes) but always use the version in Packages as the version we send down. The trick is how do we deal with existing data. Do we a) Run a task to pre-fill in the Id column (Pros: Gets all the data in, Cons: LOOOOOOOONG) or b) Just assume that "null" in the Packages.Id column means we use PackageRegistrations.Id (Pros: Easy, Cons: Old data is a little quirky).

@TimLovellSmith
Copy link
Member

Moving back to no milestone since nobody is assigned.

@analogrelay
Copy link
Contributor

This is just a proposed idea for how to solve #1260. Duping with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants