-
Notifications
You must be signed in to change notification settings - Fork 225
"kpm restore" ignores nonexistent local package feeds and gives warnings #1032
"kpm restore" ignores nonexistent local package feeds and gives warnings #1032
Conversation
{ | ||
_source = source; | ||
IsHttp = isHttp; | ||
IsHttp = IsHttpSource(source); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving initialization of IsHttp
here can simplify extraction of shared code (PackageSourceUtils.CreatePackageFeed()
). Moreover, the source
argument already contains IsHttp
information, so passing isHttp
introduces duplicated info.
f17d1ab
to
6488d09
Compare
@davidfowl , thanks for the feedbacks. Please check the latest commits. |
Is this PR related to this bug? #1018 ? |
The issue addressed with this PR and the bug #1018 seems to be similar/same except the difference of local or remote source. If |
Talked to @Praburaj and here is a summary: I think @Praburaj is right. It's ideal if local feeds and remote feeds have consistent behaviors. However, with a nonexistent folder, we cannot determine type of the local feed ( |
aac16f6
to
7464ecb
Compare
Can we highlight the warning message with a different color code. The message looks buried a bit. |
@Praburaj , the output above is using the same color code as remote feed error messages. If we want to change the color code, we should change both local and remote feeds in a separate PR. Please create an issue for it if you feel strongly. Thanks. |
|
|
||
namespace Microsoft.Framework.PackageManager.Restore.NuGet | ||
{ | ||
public class NonExistentPackageFolder : IPackageFeed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this ehhhh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the structure of a folder doesn't conform with NuGetPackageFolder
, we always assume it is a KpmPackageFolder
. So I remove NonExistentPackageFolder
and move the logic to KpmPackageFolder
. Do you like this approach? b34cda0
7464ecb
to
b34cda0
Compare
@ChengTian sure I filed #1051 |
I guess it's fine, |
- '--ignore-failed-sources' also applies to local feeds now
b34cda0
to
8d18771
Compare
parent #845
kpm restore
gives warning instead of blowing up now.Also extracted some shared code to have DRYer code.