Skip to content

feat: add first-pass Svelte language support#237

Open
justrach wants to merge 1 commit intomainfrom
feat/svelte-language-support
Open

feat: add first-pass Svelte language support#237
justrach wants to merge 1 commit intomainfrom
feat/svelte-language-support

Conversation

@justrach
Copy link
Copy Markdown
Owner

Summary

  • add .svelte language detection and a Svelte parser wrapper that only extracts symbols from <script> blocks
  • surface Svelte in language styling and special-entrypoint ranking
  • fix telemetry language-name ordering so existing php and ruby bits stay aligned while adding svelte
  • add targeted tests for Svelte parsing, inline <script> handling, detectLanguage coverage, and telemetry output

Verification

  • zig test src/tests.zig --test-filter 'Svelte:'
  • zig test src/tests.zig --test-filter 'issue-59: telemetry writes session, tool, and codebase stats ndjson'
  • zig test src/tests.zig --test-filter 'detectLanguage:'
  • zig test src/tests.zig --test-filter 'isCommentOrBlank: detects language-specific comments'

Notes

  • zig build test still fails on origin/main because the pre-existing issue-150 help-output tests are red in a clean baseline worktree as well.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e6a5abf486

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

markdown,
json,
yaml,
svelte,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep Language enum values stable across snapshot versions

Adding svelte before unknown changes the numeric value of Language.unknown, but snapshot serialization stores @intFromEnum(outline.language) and deserializes it with intToEnum (src/snapshot.zig), and the loader does not gate on a bumped format version. That means snapshots produced by the previous build will decode old unknown entries as svelte after this change, causing incorrect language metadata on warm restore. Please preserve ordinal stability (explicit enum values or append-only ordering) or bump/migrate snapshot format when enum layout changes.

Useful? React with 👍 / 👎.

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