core: python cargo feature, compile_permissive, error positions on RtlCompileError#4
Merged
Conversation
…lCompileError
Prerequisites for rtl-lsp (vscode-rtl plan §3.2):
- New cargo feature `python` (default on) gates every pyo3 touch point:
the py module, CoreErr::Py, PyFunc (uninhabited enum without the feature),
EvalEnv.py_table (via the PyTableHandle alias) and the External/Custom
callback dispatch. `cargo build --no-default-features` yields the pure-Rust
core; CI runs clippy + tests in that mode.
- Enum pyclass attributes moved to cfg_attr with class-level
rename_all = "SCREAMING_SNAKE_CASE" (variant-level #[pyo3(name)] helpers
do not survive cfg_attr); Python-visible names are unchanged (pytest: 1908).
- compile_permissive(rtl): unbound EXT('name') becomes the always-true
ExternalUnbound stub instead of a compile error, for standalone editing
without host-runtime Bindings; everything else is checked as in compile.
- RtlCompileError now exposes .line (1-based) / .col (0-based) attributes,
None when unknown.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Prerequisites for the standalone RTL language server (vscode-rtl plan §3.2):
python(default on) gates every pyo3 touch point: thepymodule,CoreErr::Py,PyFunc(an uninhabited enum without the feature),EvalEnv.py_table(via thePyTableHandlealias) and External/Custom callback dispatch.cargo build --no-default-featuresyields the pure-Rust core; CI now runs clippy + tests in that mode.cfg_attrwith class-levelrename_all = "SCREAMING_SNAKE_CASE"(variant-level#[pyo3(name)]helpers do not survivecfg_attr); Python-visible names are unchanged — the full pytest suite (1908 tests) passes.compile_permissive(rtl): an unboundEXT('name')becomes the always-trueExternalUnboundstub instead of a compile error, for standalone editing without host-runtimeBindings; everything else is checked exactly as incompile.RtlCompileErrorexposes.line(1-based) /.col(0-based) attributes,Nonewhen unknown.Consumed by regtab/vscode-rtl (
server/, rtl-lsp).🤖 Generated with Claude Code