Skip to content

C#: Simplify the Nuget Package restorer. - #22094

Merged
michaelnebel merged 5 commits into
github:mainfrom
michaelnebel:csharp/removetimeoutcase
Aug 21, 2026
Merged

C#: Simplify the Nuget Package restorer.#22094
michaelnebel merged 5 commits into
github:mainfrom
michaelnebel:csharp/removetimeoutcase

Conversation

@michaelnebel

@michaelnebel michaelnebel commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Use dotnet restore on projects/solutions even if there is a feed timeout (but only use the reachable feeds) and only use the fallback feed logic for everything that is not restored using dotnet restore.

Testing

  • DCA looks good.
  • Ran QA as well, which also looks uneventful. Note that there are some alert discrepancies for cs/simplifiable-boolean-expression, but this is because the nightly that is used as base doesn't contain a specific PR, which removes some FPs for this particular query (but the PR branch does). The issue for QA run can be seen here - note that this is only internally available for GitHub.

@github-actions github-actions Bot added the C# label Jun 30, 2026
@michaelnebel
michaelnebel force-pushed the csharp/removetimeoutcase branch from b8ee7dd to 0ed230c Compare August 13, 2026 09:50
@michaelnebel
michaelnebel force-pushed the csharp/removetimeoutcase branch 2 times, most recently from 97cf027 to a2c20f7 Compare August 14, 2026 07:58
@michaelnebel
michaelnebel force-pushed the csharp/removetimeoutcase branch from a2c20f7 to 00816ca Compare August 19, 2026 13:10
@michaelnebel michaelnebel added no-change-note-required This PR does not need a change note and removed no-change-note-required This PR does not need a change note labels Aug 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Simplifies C# NuGet restoration so dotnet restore is attempted after feed timeouts before using fallback restoration.

Changes:

  • Removes timeout-specific early fallback behavior.
  • Simplifies feed reachability APIs.
  • Updates integration baselines and change notes.
Show a summary per file
File Description
csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/NugetPackageRestorer.cs Continues normal restoration after feed timeouts.
csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/FeedManager.cs Removes unused timeout tracking.
csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_fallback/CompilationInfo.expected Updates generated metrics baseline.
csharp/ql/integration-tests/posix/standalone_dependencies_nuget_config_error_timeout/CompilationInfo.expected Updates generated timeout metrics baseline.
csharp/ql/lib/change-notes/2026-08-20-dotnet-restore.md Documents the restoration behavior change.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 5/5 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@michaelnebel
michaelnebel marked this pull request as ready for review August 20, 2026 10:52
@michaelnebel
michaelnebel requested a review from a team as a code owner August 20, 2026 10:52
@michaelnebel
michaelnebel requested a review from hvitved August 20, 2026 10:53
@michaelnebel
michaelnebel merged commit 542599e into github:main Aug 21, 2026
24 checks passed
@michaelnebel
michaelnebel deleted the csharp/removetimeoutcase branch August 21, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants