-
I've taken a quick look through the NugetUpdater helper projects, but I couldn't find an answer within 30 minutes. The only information I could find was the old pull requests that added support for NuGet development dependencies when the implementation of NuGet ecosystem support was still Ruby-only. And that implementation seems incorrect. MSBuild/dotnet/et cetera does not have any implementation for "DevelopmentDependency" items as variants of PackageReference items. This faulty support may have been implemented this way due to the confusing and...poorly written documentation for NuGet's own DevelopmentDependency specification. I spent a few hours to cross-reference that spec doc to real world examples and what little other documentation is available to write this. As stated in that write-up, setting the project configuration property "DevelopmentDependency" to
Search Keywords: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
2024-07-28 | Analysis - Part 1
In the body of
Following up the call chain(s), you end up at Examples:
From what I can tell, whether or not a package is a development dependency is determined by a package dependency. Metadata which can be used to override this is not checked. A project may use non-development-dependency packages as development dependencies, but NuGetUpdater does not check for this. Primarily because there is no standard in the NuGet ecosystem for a dependent to explicitly state a dependency will only be used as a development dependency. It doesn't help that there are multiple types of dependencies. This is in stark contrast to the NPM ecosystem in which a project (i.e. package.json) categorizes dependencies in multiple ways:
2024-07-31 | Analysis - Part 2
I found it.
dependabot-core/common/lib/dependabot/dependency.rb Lines 180 to 189 in 8296fc2 If top-level... dependabot-core/common/lib/dependabot/dependency.rb Lines 191 to 194 in 8296fc2 If NOT top-level... dependabot-core/common/lib/dependabot/dependency.rb Lines 18 to 26 in 8296fc2 Dependabot NuGet implementationNuGet checks the dependency groups for a group whose dependabot-core/nuget/lib/dependabot/nuget.rb Lines 18 to 26 in 8296fc2 See Line 117. A dependency is grouped in "devDependencies if NativeDependencyFileDiscoveryfinds dependency_details.is_dev_dependency` is true. Else, the dependency is grouped in "dependencies".NativeDependencyDetails directly correlates to NuGetUpdater.Core.Dependency
dependabot-core/common/lib/dependabot/pull_request_creator/message_builder.rb Lines 809 to 822 in 8296fc2
|
Beta Was this translation helpful? Give feedback.
-
Your analysis in the previous comment is correct; we report something as a development dependency if we can't find any runtime files (e.g., anything under As for surfacing that in the commit message, I'll have to yield to the core dependabot team, I'm not sure how that part of the code works. |
Beta Was this translation helpful? Give feedback.
2024-07-28 | Analysis - Part 1
CompatibilityChecker.CheckAsync
gets anisDevDependency
bool fromCompatibilityChecker.GetPackageInfoAsync
.dependabot-core/nuget/helpers/lib/NuGetUpdater/NuGetUpdater.Core/Analyze/CompatabilityChecker.cs
Lines 20 to 33 in 16f4c43