-
Notifications
You must be signed in to change notification settings - Fork 1
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
Creating package dependency without a version will result in "latest" #104
Creating package dependency without a version will result in "latest" #104
Conversation
var versionDep = splitDependency[1]; | ||
yield return new PackageDependency(splitDependency[0], versionDep); | ||
} | ||
yield return (PackageDependency)dep; |
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.
Isn't this just dependencies.Cast<PackageDependency>()
?
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.
That does not work for user-defined operators sadly:
https://stackoverflow.com/questions/13316718/explicit-implicit-cast-operator-fails-when-using-linqs-cast-operator
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 cast operator magic anyway, it's basically hiding the creation of a PackageDependency object here.....why not just new PackageDependency(dep)
? Everyone recognizes that....
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.
But ok, that's a bigger change.
var versionDep = splitDependency[1]; | ||
yield return new PackageDependency(splitDependency[0], versionDep); | ||
} | ||
yield return (PackageDependency)dep; |
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 cast operator magic anyway, it's basically hiding the creation of a PackageDependency object here.....why not just new PackageDependency(dep)
? Everyone recognizes that....
var versionDep = splitDependency[1]; | ||
yield return new PackageDependency(splitDependency[0], versionDep); | ||
} | ||
yield return (PackageDependency)dep; |
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.
But ok, that's a bigger change.
fixes #75