-
Notifications
You must be signed in to change notification settings - Fork 0
ci(csharp): validate packaged bindings by runtime #76
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7e4efeb
ci(csharp): validate packaged bindings by runtime
Seddryck b9ba1a2
ci(csharp): restore packages from local feed
Seddryck cbff335
docs(csharp): explain native build matrix
Seddryck 098cc0d
ci(native): validate macOS and ARM64 packages
Seddryck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Seddryck/Expressif.Syntax
Length of output: 9914
🏁 Script executed:
Repository: Seddryck/Expressif.Syntax
Length of output: 24152
🌐 Web query:
NuGet RestoreAdditionalProjectSources package source mapping exact package ID multiple sources same version source selection official documentation💡 Result:
NuGet does not support prioritization of package sources during restore [1][2][3]. When multiple sources are configured, NuGet attempts to retrieve packages from all of them in parallel, and the restore process is non-deterministic regarding which source is used if the same package ID and version exist in multiple locations [4][2]. To achieve deterministic restore behavior and control source selection, you must use Package Source Mapping [4][5]. Package Source Mapping allows you to explicitly define which source(s) NuGet should search for specific packages [4][6]. This is the recommended approach to resolve ambiguity when a package ID exists in multiple sources [4][5]. Key rules for Package Source Mapping include: 1. Pattern Precedence: When multiple patterns match a package ID, the most specific (longest) match takes precedence [4][5]. Exact package ID patterns have the highest precedence, while the generic * (wildcard) pattern has the lowest [4][5]. 2. Comprehensive Mapping: Once you define a packageSourceMapping section, you must explicitly map every package used in the solution, including all transitive dependencies [4][6]. 3. Multiple Sources for a Pattern: While you can map the same package ID pattern to multiple sources, it is not recommended because it prevents predictable source selection [4][7]. Regarding
RestoreAdditionalProjectSources, this property adds package sources to the restore process just as if they were defined in your NuGet.config file [3]. It does not introduce any priority or selection logic; these added sources are treated equally alongside all other configured sources [2][3]. In summary, reliance on source order or "priority" is not supported and will not reliably resolve conflicts [1][2]. The official and supported solution is to implement Package Source Mapping in your NuGet.config file to enforce specific source usage for specific package IDs [4][5].Citations:
Restrict
Expressif.Syntaxto the downloaded package source.RestoreAdditionalProjectSourcesdoes not prioritize the artifact directory. If another feed contains the same package ID and version, NuGet can restore that package instead. Create a temporary NuGet config that mapsExpressif.Syntaxonly toartifactsand maps*to the normal feed for test dependencies. Pass it with--configfilein both restore steps:.github/workflows/ci.ymland.github/workflows/release.yml.🧰 Tools
🪛 zizmor (1.29.0)
[info] 222-222: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[info] 231-231: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
📍 Affects 2 files
.github/workflows/ci.yml#L216-L232(this comment).github/workflows/release.yml#L208-L223🤖 Prompt for AI Agents