xtask test-csharp: source mapping verification fails when nuget.org is unreachable
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- build-system, testing
Research direction
Start in xtask/src/tasks/bindings/csharp.rs around lines 506–514 and reproduce with cargo xtask test-csharp --release --nuget-dir
while api.nuget.org is unreachable. Read bindings/csharp/nuget.config and the existing NU1101 validation to understand the available handling options. Done means the verification behaves as documented in restricted-network environments without masking unrelated restore failures.Written by the indexing model from the issue text.
Description
Problem
The source mapping verification in cargo xtask test-csharp (in xtask/src/tasks/bindings/csharp.rs) expects dotnet restore to fail with NU1101 (package not found) to confirm that Microsoft.Regorus cannot be resolved from external sources via package source mapping.
However, in environments where api.nuget.org is unreachable (e.g., air-gapped CI, restricted networks, corporate proxies), the restore fails with NU1301 (unable to load service index) instead. The verification then treats this as an unexpected failure and aborts.
Expected Behavior
The verification should handle the case where the external source is unreachable. Possible approaches:
- Accept
NU1301as evidence that external resolution is blocked (though this is weaker — it proves unreachability, not that source mapping works). - Add a CLI flag or environment variable (e.g.,
--skip-source-mapping-verifyorREGORUS_SKIP_SOURCE_MAPPING_VERIFY) to allow skipping the verification in environments where it cannot succeed. - Allow the nuget.org URL in
bindings/csharp/nuget.configto be overridden (e.g., via an environment variable or additional CLI option) so users can point it at a reachable mirror.
Reproduction
Run cargo xtask test-csharp --release --nuget-dir <dir> in an environment where https://api.nuget.org/v3/index.json is not accessible.
Relevant Code
xtask/src/tasks/bindings/csharp.rs, lines 506–514:
// Ensure the failure is specifically NU1101 for Microsoft.Regorus, not an
// unrelated error (e.g. network outage).
"Source mapping verification failed: dotnet restore failed, but not for the \
expected reason. Expected NU1101 for Microsoft.Regorus to confirm external \
resolution is blocked.\nstdout:\n{stdout}\nstderr:\n{stderr}"
));
}
- Dominant language
- Rust
- Stars
- 375
- Forks
- 81
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 78
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/regorus
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
RVM: errors and conflicts in rule bodies evaluate to undefined, even with strict builtin errorsMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoft/regorus#932 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 32/100
Maintainers usually reply within 1 day
All issues in microsoft/regorus
Similar issues
-
documentation target:powerpoint
Difficulty 1/5 Under an hour Newbie friendliness 76/100
tomast1337/PdfLapas#602 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
SlimeBoyOwO/LingChat#965 ·
Maintainers usually reply within 3 days
-
[Windows] Hidden title bar: a maximized window restored from minimized on a secondary monitor gets the primary monitor's work area as its client areaPossibly taken @lijy91 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
libnativeapi/nativeapi#53 · 1 reaction ·
Maintainers usually reply within 1 day
-
bug db/dameng user-priority/P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day