Repository navigation
Spell generated references from global:: and refuse members named after their type - #331
Merged
Merged
Conversation
Refusing unknown options (#310) and the --no-data flag landed separately, and validate's list of known options was left empty, so 'validate --no-data' exited 1 with the usage text and TestValidateSkipsDataFilesWhenAskedTo fails on main. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9FBXHS37WoAF87LDY2ZVV
…d after their type A schema class or generator namespace called System (or ktsu) shadowed the root namespace every generated reference starts with, so the generated C# did not compile. Every emitted System./ktsu. reference is now written from global::. A member named after its class, a function named after its interface, and a semantic type named Value (the member holding its value) have no spelling in C# (CS0542) or C++, so validation now refuses each with an error naming both. Fixes #232 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9FBXHS37WoAF87LDY2ZVV
Contributor
Author
|
The failing test here was Generated by Claude Code |
The registry is an unsynchronised dictionary meant to be filled once at start-up, and these tests register into it concurrently under method-level parallelism. A lost write during a resize failed CI on Windows with a generator registered a line earlier reported as unknown. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9FBXHS37WoAF87LDY2ZVV
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Requested by Matt · project thread
Fixes #232
Summary
System, or a generator namespace ending in.System, shadowed the namespace that generated references start with, so the generated C# did not compile. The C# generator now writes all 44 emittedSystem./ktsu.references fromglobal::.Value, which is the name of the member that holds its value.The comparison is ordinal, so
scoreinsideScoreis still accepted.Tests
GeneratedNameCollisionTestsgenerates and compiles a schema with a class namedSystem(and one namedktsu) next to a class holdingVector3,List<string>andDateTimemembers. It also compiles the same schema under namespaceGame.System.Systemclass test and theGame.Systemtest fail to compile.CodeGenerationTestsDataRows are updated to theglobal::spelling.The full suite passes except
TestValidateSkipsDataFilesWhenAskedTo. That test is red onmaintoo and is fixed by #330.Generated by Claude Code