Skip to content

serve: fix declaration order (E088) - #3729

Merged
BaseMax merged 1 commit into
mainfrom
fix-serve-order
Nov 21, 2026
Merged

BaseMax merged 1 commit into
mainfrom
fix-serve-order

Conversation

@BaseMax

@BaseMax BaseMax commented Nov 21, 2026

Copy link
Copy Markdown
Member

The SPA fallback helper from #3726 sat after the public functions in driver_api_web.salam, so the compiler no longer built. Moves it above them.

@BaseMax
BaseMax requested a review from a team as a code owner November 21, 2026 04:49
@BaseMax
BaseMax merged commit 133a798 into main Nov 21, 2026
5 checks passed
@BaseMax
BaseMax deleted the fix-serve-order branch November 21, 2026 04:49
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown
Contributor
sha=3eee892e3c3c9f7d287d279498e93fd0e4f77055

🤖 Salam AI review

Verdict: ✅ Good to merge

commit 3eee892 · 1 files · +9 −9 · model salam

Summary

This pull request fixes a compiler build failure by relocating the private helper serve_index_wants_spa from after the public functions to before them in compiler/driver/driver_api_web.salam, satisfying Salam's required declaration order. The change is minimal and correctly scoped, moving nine lines without altering logic.

What changed

A single private function, serve_index_wants_spa, was moved from a position after the public functions (following Web) to a position among the private functions (after ui_web_only), ahead of pub func Js. No logic was modified.

Review

  • compiler/driver/driver_api_web.salam: the relocation matches Salam's enforced declaration order (package, import, include, globals, types, private functions, then public functions), which is what triggered E088. Placing the helper after ui_web_only and before the first pub func is the correct spot.
  • The helper remains a non-pub function, so it stays internal to the file; no visibility or API surface changes.
  • The body is unchanged, so behaviour of Serve and the SPA fallback is unaffected.

Tests

No test changes are included; this is a compile-order fix. Whether the compiler now builds end-to-end could not be verified from the diff alone.

Risks

Low. The only risk is if another private function was expected between ui_web_only and the new helper, but the diff shows ui_web_only directly precedes the first public function, so insertion there is safe.


⚠️ This review was written automatically by an AI and may contain mistakes. It is a helper for maintainers, not a replacement for a human review: check the code yourself before merging.

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.

1 participant