Repository navigation
fix: qualify shadowed Dart deserializer fields - #8233
Vincent Biret (baywet) merged 6 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The targeted fix and regression coverage have no unresolved blocking issues.
Review effort: Lite
Findings: None
What changed in this PR
Fixes Dart deserializer field shadowing for properties named node or deserializerMap.
Changes:
- Qualifies conflicting assignments with
this.. - Adds regression coverage for inheritance and non-inheritance cases.
- Documents the fix in the changelog.
| File | Description |
|---|---|
tests/Kiota.Builder.Tests/Writers/Dart/CodeMethodWriterTests.cs |
Adds regression coverage. |
src/Kiota.Builder/Writers/Dart/CodeMethodWriter.cs |
Fixes generated deserializer assignments. |
CHANGELOG.md |
Records the Dart fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Shubham Padkonde (@Shubham-Padkonde) your behaviour is disruptive, opening about 30 PRs on the repos in a couple of hours time, most likely code that was AI generated and not tested/reviewed, will only clog our review pipeline. Please stop opening additional pull requests and work on the comments added to existing ones. We have turned on pull requests limits on this repository, and will proceed to blocking you at the organization level if additional pull requests are opened on other repositories before the already opened ones are reviewed and closed/or merged. |
|
Shubham Padkonde (@Shubham-Padkonde) can you remove the corresponding suppressions from |
|
Removed the Meraki Dart suppression for #7822 from Prepared with Codex assistance. |
Head branch was pushed to by a user without write access
|
The newly enabled Meraki Dart job exposed another name collision: a model property named Fixed in a2b72c6 using the existing Dart reserved-name escaping: the member becomes Validation:
I also inspected the other error-bearing jobs in the run. They remain covered by existing per-language/API suppressions, including Meraki Go, Notion, Graph Beta, Stripe and Twitter combinations; I have not removed or expanded those suppressions. The separate surface-area comment jobs report missing optional artifacts but conclude successfully. Please rerun the integration workflow on the updated head when convenient. These are local validation results, not a claim that the new hosted run has passed. Prepared with Codex assistance. |
|
Merged current main (c1bf067) and resolved the changelog conflict by preserving both the Dart entry and the newly merged Java entry. The Dart code fix and removed Meraki suppression remain intact. Validation: .NET build succeeds with zero warnings/errors; all 78 targeted Dart refiner and method-writer tests pass; whitespace checks pass. Hosted integration results on this merge commit are not yet verified. Prepared with Codex assistance. |
Fixes #7822.
Dart deserializer lambdas assign to the wrong variable when a model property is named
node(the lambda parameter) ordeserializerMap(the local map). Qualify these two field assignments withthis.; other generated assignments remain unchanged.Four writer regression cases cover both names with and without inheritance. All four fail before the change. A reduced OpenAPI document with a nested object named
node, a string nameddeserializerMap, and an ordinary control field generates two Dart analyzer errors before the fix.Validation:
Changed C# files pass
dotnet format --verify-no-changes.Developed with Codex assistance. Generated-code checks use a reduced reproduction of the reported collision, not the entire Meraki API. No live API calls were made.
Integration follow-up
Enabling the Meraki Dart integration exposed an
overridemember/annotation collision. The existing Dart reserved-name escaping now renames that member tooverride_while preserving its JSON key. The regression fails before the fix and passes afterward; 78 targeted Dart tests pass. The full current Meraki client generates and passes Dart 3.13.4 analysis with no issues. Hosted CI still needs to run on the latest head. Follow-up prepared with Codex assistance.