Repository navigation
Python Nested Union Variants - #111
Merged
Merged
Conversation
Kronos3
added a commit
that referenced
this pull request
Oct 11, 2026
Brings in #101-#111 on top of the Scala parity work. Conflict resolutions: - fpp_analysis: the Scala-ordered errors.rs/analysis.rs and the split semantics files are kept. #106 is re-applied inside them: InvalidTlmPacketSet is back to Scala's (loc, name, msg) shape and the new TlmPacketSetChannelsNotCovered / TlmPacketSetChannelsUsedAndOmitted variants sit next to it. check_channel_usage keeps Scala's per-channel scan in dictionary order to decide which error comes first, then lists every channel failing that check. The packet and packet set errors stay at the specifier, where Scala reports them (#106 moved them to the name). get_uncovered_channels(_for_node) serve the LSP quick fix. #105 makes partial_topology_map crate-private. #103 and #107 were already ported from the same Scala tests; one copy of each is kept. - fpp_lsp_parser: #102's expect() in place of bump() on top of the lookahead dispatch, so the parser neither asserts nor changes acceptance. - fpp_lsp_server: the code action and its tests next to ours. - fpp_parser/src/error.rs: ours (the include cycle diagnostic #111 touched is now IncludeError::Cycle). - fpp_python: master's nested-union generator, macros and runtime, with IndexSet support and our comment fixes on top; all generated files are regenerated with `make -C fpp_python codegen` (the stubs now live in python/fpp/{__init__,ast}.pyi). Tests follow the nested names and our API shape (19 symbol variants, TemplateArgKind and ScopeOwner unions, Display-based type reprs). - Cargo.lock: master's, updated by cargo for our dependencies.
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.
Closes #110
This PR changes the naming of Rust ADT enums variants in Python from using name mangling to being nested inside a scope. This keeps the naming inline with that of Rust/Scala. This PR also nests the
astdefinitions into a Python submodule. This also means the shadowed AST names can be properly represented in Python now. All shadowed modeling has been dropped from the bindings.