Repository navigation
fix: support versioned namespaces in CTO parser #1084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1699,8 +1699,14 @@ QualifiedNamespaceDeclaration | |||||||||||||
|
|
||||||||||||||
| Namespace | ||||||||||||||
| = NamespaceToken __ ns:QualifiedNamespaceDeclaration __ { | ||||||||||||||
| return ns; | ||||||||||||||
| } | ||||||||||||||
| if (ns.version) { | ||||||||||||||
| return { | ||||||||||||||
| name: ns.name, | ||||||||||||||
| namespace: ns.namespace | ||||||||||||||
| }; | ||||||||||||||
| } | ||||||||||||||
|
Comment on lines
+1702
to
+1707
|
||||||||||||||
| if (ns.version) { | |
| return { | |
| name: ns.name, | |
| namespace: ns.namespace | |
| }; | |
| } |
Copilot
AI
Mar 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR description calls out adding a regression test for versioned namespaces, but this PR’s changed files don’t include any test updates/additions. Please add/adjust a test case that would have failed before this fix (e.g., a CTO file using namespace org.example@1.0.0 in the scenario that broke cicero archive) so the behavior is locked in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generated action (
peg$f104) checksns.version, butQualifiedNamespaceDeclarationreturns a string in the current grammar, so this condition will never be true and the intended normalization won’t run. After fixing the grammar, please re-run thepeggygeneration step solib/parser.jsreflects the actual (working) logic.