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

Creating package dependency without a version will result in "latest" #104

Conversation

mmsmits
Copy link
Member

@mmsmits mmsmits commented Mar 6, 2024

fixes #75

@mmsmits mmsmits requested a review from ewoutkramer March 6, 2024 10:06
var versionDep = splitDependency[1];
yield return new PackageDependency(splitDependency[0], versionDep);
}
yield return (PackageDependency)dep;
Copy link
Member

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>() ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

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....

Copy link
Member

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.

@mmsmits mmsmits requested a review from ewoutkramer March 12, 2024 09:47
var versionDep = splitDependency[1];
yield return new PackageDependency(splitDependency[0], versionDep);
}
yield return (PackageDependency)dep;
Copy link
Member

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;
Copy link
Member

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.

@ewoutkramer ewoutkramer merged commit 73d355d into develop Mar 12, 2024
4 checks passed
@ewoutkramer ewoutkramer deleted the 75-packagecontextinstallpackagedependency-with-version-null-should-return-the-latest-version branch March 12, 2024 10:33
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.

PackageContext.Install(PackageDependency) with version 'null' should return the latest version
2 participants