Skip to content

Refactor nuget - #2410

Merged
matthid merged 3 commits into
masterfrom
refactor_nuget
Jun 10, 2017
Merged

matthid merged 3 commits into
masterfrom
refactor_nuget

Conversation

@matthid

@matthid matthid commented Jun 10, 2017

Copy link
Copy Markdown
Member

Basically everything was in the NuGetV2 module.
Now the following is separated:

  • NuGetCache
  • NuGetLocal
  • NuGetV2
  • NuGetV3
  • Nuget <- This is the module used thoughout Paket code (with some exceptions) it provides type forwards that the other ones don't need to be opened.

This PR builds on top of #2362 (will be easier to review once I got #2362 green and merged it)

@baronfel baronfel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great effort, I really like the work to abstract away particular nuget versions. One minor question is all I have.


let request = HttpWebRequest.Create(downloadUri) :?> HttpWebRequest
#if NETSTANDARD1_6
// Note: this code is not working on regular non-dotnetcore

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have this same block in a few places, would it make sense to pull out an http abstraction that handles doing this the right way in a single place?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It's really unfortunate. I have the same code in FAKE as well :/

Problem is this is already a lightweight abstraction (see Paket.Utils) it's just that at this particular place they have subtle different behavior. I noted somewhere I'd would be better to use the new HttpClient everywhere but I didn't want to change everything at the time....

@matthid
matthid merged commit 81e5673 into master Jun 10, 2017
@matthid
matthid deleted the refactor_nuget branch June 15, 2017 22:10
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.

2 participants