Skip to content

RuleScript v1.8.0

Choose a tag to compare

@github-actions github-actions released this 06 Jul 01:06
· 31 commits to main since this release
7b32bf8

RuleScript v1.8.0

RuleScript v1.8.0 is a maintenance-focused refactor for editor and analyzer infrastructure. It does not add Rule Script syntax, executable language constructs, or runtime behavior changes.

Unified Function Symbols

Function metadata is now represented by RuleScriptFunctionSymbol across user, imported, host, and built-in functions. Function origin is described by RuleScriptFunctionKind:

  • User
  • Imported
  • Host
  • Builtin

Use RuleScriptAnalysisResult.Functions for unified editor-facing lookup. Each function symbol can carry parameter metadata, return type, source location, documentation, host metadata, built-in metadata, or import metadata.

The legacy RuleScriptHostFunctionSymbol and RuleScriptBuiltinFunctionSymbol public classes remain available as obsolete compatibility adapters. Existing code can continue to read HostFunctions, BuiltinFunctions, and RegisteredHostFunctions, while new integrations should prefer RuleScriptFunctionSymbol.

Shared Function Resolution

Function lookup for analysis and editor metadata now flows through a shared resolver model. Diagnostics, Go To Definition, and Find References can resolve user, imported, host, and built-in functions through unified RuleScriptFunctionSymbol metadata instead of switching across separate function symbol classes.

Source Locations And Ranges

Internal source mapping is centralized through RuleScriptSourceMapper. Diagnostics, analysis symbols, runtime event ranges, and navigation metadata use the same RuleScriptSourceRange mapping and half-open range containment rules.

External DTOs such as RuleScriptDefinitionInfo, RuleScriptReferenceInfo, RuleScriptDiagnostic, and runtime events keep their existing output shape.

Reusable Document Analysis

Editor integrations can parse and analyze a document once with RuleScriptLanguageService.AnalyzeDocument:

var document = RuleScriptLanguageService.AnalyzeDocument(engine, source);

var definition = RuleScriptLanguageService.GetDefinition(document, line: 4, column: 1);
var references = RuleScriptLanguageService.FindReferences(document, line: 4, column: 1);

RuleScriptDocumentAnalysisResult contains source text, tokens, statements, regions, and RuleScriptAnalysisResult. RuleScriptAnalysisCache can reuse unchanged per-document analysis results and replace only the updated document.

This is a low-risk cache boundary for editor features. It is not a full incremental compiler.

Compatibility And Scope

  • No Rule Script runtime behavior changes.
  • No parser syntax changes.
  • No formatter output changes.
  • No executable language constructs added.
  • Existing public APIs remain available.
  • Obsolete function symbol adapters are retained for compatibility.
  • Rename, Hover, Completion, Monaco UI, and LSP transport remain outside this refactor.

Validation

The v1.8.0 maintenance refactor is protected by regression tests for:

  • Unified user, imported, host, and built-in function symbols.
  • Public adapter compatibility.
  • Go To Definition and Find References for functions, parameters, and variables.
  • Missing symbol behavior.
  • Shared source range mapping.
  • Reusable document analysis and cache behavior.
  • Formatter, diagnostics, and runtime behavior stability.