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

only report dependencies from project files that have a target framework #9347

Merged

Conversation

brettfo
Copy link
Collaborator

@brettfo brettfo commented Mar 21, 2024

If a <TargetFramework> cannot be parsed from a .csproj/.vbproj/.fsproj, there's no meaningful update that can be performed, so we explicitly check for that. This also means that we can't pull dependencies directly from packages.config, etc. because we still depend on the project file's contents, so the tests were updated to reflect that. global.json and dotnet-tools.json are exceptions to requiring a project file and are still handled appropriately.

Update to smoke-tests

This PR depends on a PR dependabot/smoke-tests#197 and they must be taken in parallel.

Temporary commit has been removed. N.b., this PR has a temporary commit that points to the smoke-tests PR branch to show the smoke-tests passing. That commit will need to be removed before this is merged.

@brettfo brettfo requested a review from a team as a code owner March 21, 2024 21:47
@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Mar 21, 2024
@brettfo
Copy link
Collaborator Author

brettfo commented Mar 21, 2024

Smoke tests are failing for expected reasons, going to start on those now. The short version is that a dependency is now only reported for its initiating .csproj where before it was reported for the .csproj as well as Directory.Packages.props, etc.

@brettfo
Copy link
Collaborator Author

brettfo commented Mar 26, 2024

Edit: My smoke-test changes were out-of-date. I've updated that branch so this shouldn't be an issue any more.

Original comment:

The failing smoke test is unrelated to this PR. Error message/diff looks like:

--- smoke.yaml
+++ result.yaml
@@ -100,7 +97,7 @@
                   support_file: false
                   type: file
                 - content: |
-                    # This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
+                    # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand.
 

@brettfo brettfo force-pushed the dev/brettfo/nuget-dependencies-only-from-project branch from 6953abf to 8a885f7 Compare March 26, 2024 19:38
@brettfo brettfo force-pushed the dev/brettfo/nuget-dependencies-only-from-project branch from 8a885f7 to 171d06c Compare March 26, 2024 20:38
@abdulapopoola abdulapopoola merged commit cd03173 into main Mar 26, 2024
62 of 67 checks passed
@abdulapopoola abdulapopoola deleted the dev/brettfo/nuget-dependencies-only-from-project branch March 26, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants