fix: keep escaped Go namespaces lowercase - #8235
Shubham Padkonde (Shubham-Padkonde) wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Fixes Go namespace escaping so generated imports match lowercase directories on case-sensitive filesystems.
Changes:
- Uses a lowercase
escapedsuffix for reserved namespaces. - Adds regression coverage for
switch,type, andvendor. - Documents the fix in the changelog.
| File | Description |
|---|---|
tests/Kiota.Builder.Tests/Refiners/GoLanguageRefinerTests.cs |
Adds reserved namespace regression tests. |
src/Kiota.Builder/Refiners/GoRefiner.cs |
Applies lowercase namespace escaping. |
CHANGELOG.md |
Records the Go casing 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) this PR is conflicting, would you mind handling the conflicts when you have a minute please? |
|
This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged. |
|
Conflicts have been resolved. A maintainer will take a look shortly. |
|
This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged. |
|
Conflicts have been resolved. A maintainer will take a look shortly. |
1 similar comment
|
Conflicts have been resolved. A maintainer will take a look shortly. |
|
This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged. |
|
Conflicts have been resolved. A maintainer will take a look shortly. |
|
Conflicts have been resolved. A maintainer will take a look shortly. |
|
This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged. |
|
Conflicts have been resolved. A maintainer will take a look shortly. |
Fixes #7828.
Go namespace normalization happens before reserved-name escaping. The escape suffix then introduces an uppercase
E, while the path segmenter writes lowercase directories. A request builder importing a nested query-enum package consequently importsswitchEscaped/...from a directory namedswitchescaped/..., which fails on Linux.Use a lowercase suffix for reserved namespaces. Property, parameter and other identifier escaping remains unchanged. Three refiner regressions cover
switch,type, andvendor, preserving the configured client namespace prefix. All three fail on the original code.The original Meraki endpoint
/devices/{serial}/switch/routing/interfaces, including its query enums, reproduces the missing-package/case-insensitive-import-collision errors in generated Go. Checks use that endpoint extracted from the upstream API description, not the full Meraki SDK.Developed with Codex assistance. No live Meraki API calls were made.
Validation:
go test ./...andgo vet ./...pass on Linux Go 1.26.3. Before the change, the same endpoint fails with the reported import casing mismatch.