Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

DNU should allow absence of "versions" property in v3 index.json #2447

Closed
ChengTian opened this issue Aug 10, 2015 · 8 comments
Closed

DNU should allow absence of "versions" property in v3 index.json #2447

ChengTian opened this issue Aug 10, 2015 · 8 comments
Assignees
Milestone

Comments

@ChengTian
Copy link
Contributor

That means we also consider unlisted packages during restore. It can also fix the exception thrown by dnu restore when restoring package like https://az320820.vo.msecnd.net/v3-flatcontainer/classlibrary1/index.json

@davidfowl agrees that this can be assigned to me.

@pranavkm
Copy link
Contributor

cc @yishaigalatzer Might be something that needs to be ported to nuget.

@yishaigalatzer
Copy link

This seems wrong. The plan is to fix the server, although we can revisit the discussion worth a short f2f tomorrow

@ChengTian
Copy link
Contributor Author

@yishaigalatzer , to fix at server side, do you want to return index.json that always contain versions property, even it is empty?

The current problem is that if all versions of a package are unlisted, we get index.json like

{
  "unlistedVersions": [
    "1.0.0"
  ]
}

The absence of versions property makes dnu think it is an invalid response.

/cc @davidfowl @lodejard

@ChengTian
Copy link
Contributor Author

Talked to @davidfowl and we want to leave the current implementation for now. I filed an issue for fixing at server side: NuGet/NuGetGallery#2617

@ChengTian ChengTian modified the milestones: Backlog, 1.0.0-beta7 Aug 11, 2015
@ChengTian
Copy link
Contributor Author

Need a discussion to decide whether we still want this change. Putting to backlog.

@lodejard
Copy link
Contributor

Seems reasonable to treat missing property the same as an empty array

@ChengTian
Copy link
Contributor Author

@lodejard , makes sense, I have a PR for it here: #2459. Please help to review.

@ChengTian ChengTian changed the title Merge "versions" and "unlistedVersions" sections when restoring from v3 feeds DNU should allow absence of "versions" property in v3 index.json Aug 13, 2015
@ChengTian
Copy link
Contributor Author

The work at server side is tracked at NuGet/NuGetGallery#2617 and NuGet team is deploying the changes now. The fix at DNX side is merged. Closing.

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

No branches or pull requests

4 participants