Skip to content

fix: keep escaped Go namespaces lowercase - #8235

Open
Shubham Padkonde (Shubham-Padkonde) wants to merge 10 commits into
microsoft:mainfrom
Shubham-Padkonde:fix/go-reserved-namespace-casing
Open

Shubham Padkonde (Shubham-Padkonde) wants to merge 10 commits into
microsoft:mainfrom
Shubham-Padkonde:fix/go-reserved-namespace-casing

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown
Contributor

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 imports switchEscaped/... from a directory named switchescaped/..., 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, and vendor, 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:

  • Three new regressions fail before the change and pass after it.
  • Full builder suite: 2,351 passed, two skipped, one live API download timed out after 100 seconds. The sole failed test passed on a focused retry without code changes.
  • .NET 10 generator build passes with four worktree SourceLink warnings.
  • Generated Meraki endpoint: go test ./... and go vet ./... pass on Linux Go 1.26.3. Before the change, the same endpoint fails with the reported import casing mismatch.
  • Scoped C# formatting verification passes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 escaped suffix for reserved namespaces.
  • Adds regression coverage for switch, type, and vendor.
  • 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.

@baywet

Copy link
Copy Markdown
Member

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.

Copilot AI review requested due to automatic review settings September 21, 2026 16:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings September 22, 2026 09:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings September 22, 2026 14:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@baywet

Copy link
Copy Markdown
Member

Shubham Padkonde (@Shubham-Padkonde) this PR is conflicting, would you mind handling the conflicts when you have a minute please?

Copilot AI review requested due to automatic review settings September 23, 2026 12:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings September 23, 2026 14:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.

Copilot AI review requested due to automatic review settings September 23, 2026 17:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will take a look shortly.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.

Copilot AI review requested due to automatic review settings September 24, 2026 01:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will take a look shortly.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will take a look shortly.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.

Copilot AI review requested due to automatic review settings September 25, 2026 01:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will take a look shortly.

@github-actions

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will take a look shortly.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicting changes, the author must resolve the conflicts before this pull request can be merged.

Copilot AI review requested due to automatic review settings September 25, 2026 21:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will take a look shortly.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GO] Directory casing problem for MERAKI.COM api

3 participants