Skip to content

Commit bfdb5fb

Browse files
jfblaaclaude
andauthored
fix(manifest): stop calling skipped .NET projects not restored (#1704)
After a failed `dotnet restore`, a project whose restore output cannot be shown current was reported as "did not restore this project in this run". NuGet does not rewrite project.nuget.cache for a project it finds up to date, so such a project may well have been restored. Say what is known: restore may have skipped it as up to date, or never reached it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent fda490b commit bfdb5fb

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

7+
## [Unreleased]
8+
9+
### Fixed
10+
- When `dotnet restore` fails in one .NET project, the projects it may have skipped as up to date are no longer reported as not restored.
11+
712
## [1.14.1](https://github.com/SocketDev/socket-cli/releases/tag/v1.14.1) - 2026-11-06
813

914
### Changed

‎src/commands/manifest/scripts/dotnet-tool/FactsRunner.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ private void ReportRestoreErrors() {
311311
}
312312
}
313313
foreach (var key in _notRestored.Where(k => !withErrors.Contains(k))) {
314-
_records.Unscannable("", "`dotnet restore` did not restore this project in this run, so its dependencies are unknown", key);
314+
_records.Unscannable("", "the failed `dotnet restore` may have skipped this project as up to date, or never reached it, so its dependencies are unknown", key);
315315
}
316316
}
317317

‎src/commands/manifest/scripts/test/dotnet-compat/assert-facts.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def records_phase():
172172
check(any(r[0] == 'failure' and 'Demo.Ext.DoesNotExist' in '\t'.join(r) for r in stale), 'failed restore reported')
173173
reused = {r[2] for r in stale if r[0] == 'root'} - {'test/App.Tests/App.Tests.csproj'}
174174
check(not reused, f'projects read from a previous restore {sorted(reused)}')
175-
unknown = {r[3] for r in stale if r[0] == 'unscannable' and 'did not restore this project' in r[2]}
175+
unknown = {r[3] for r in stale if r[0] == 'unscannable' and 'may have skipped this project' in r[2]}
176176
check({'src/App/App.csproj', 'src/Extra/Extra.csproj', 'src/Lib/Lib.csproj'} <= unknown, f'unrestored projects reported {sorted(unknown)}')
177177

178178
evaluation = records('evaluation.tsv')

0 commit comments

Comments
 (0)