Skip to content

fix: preserve project namespaces with inline comments - #123

Merged
vycdev merged 1 commit into
vycdev:mainfrom
vycdev2:fix/project-namespace-inline-comments-20260809T224148Z
Aug 10, 2026
Merged

fix: preserve project namespaces with inline comments#123
vycdev merged 1 commit into
vycdev:mainfrom
vycdev2:fix/project-namespace-inline-comments-20260809T224148Z

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Preserve namespace metadata when a valid namespace declaration has an inline # comment.
  • Keep the pre-scan aligned with the lexer/parser, which already treats # as a comment delimiter.

Root cause

jett_project pre-scanning used the entire trimmed remainder after namespace as the name. A declaration such as namespace app.models # project API was therefore discarded because the remainder contained spaces, leaving SourceFile.namespaces empty.

Test plan

  • Added prescan_namespaces_ignores_inline_comments regression coverage.
  • Verified the new test fails before the fix and passes after it.
  • cargo fmt --all -- --check
  • cargo check --workspace
  • cargo build --workspace
  • Focused lexer, project, diagnostics, LSP, and CLI tests
  • cargo test -q (including 432 fixture tests)
  • cargo clippy -q -p jett_project --all-targets -- -D warnings
  • git diff --check
  • Validated VS Code extension JSON metadata; no editor files changed.

Risk and scope

This is a narrow project-discovery fix. It only strips the inline comment from namespace pre-scan input; invalid namespace names remain rejected, and source parsing behavior is unchanged. The workspace-wide clippy gate still reports the two pre-existing lexer lints covered by open PR #120.

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

@vycdev
vycdev merged commit 1e6544f into vycdev:main Aug 10, 2026
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.

2 participants