Skip to content

RuleScript v1.10.1

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Jul 06:27
a0be9be

RuleScript v1.10.1

RuleScript v1.10.1 fixes editor analysis for scripts that are analyzed from text while belonging to a file inside a project subdirectory.

Source-File-Aware Analysis

RuleScriptEngine.Analyze and RuleScriptEngine.TryAnalyze now include overloads that accept the script source file path:

var engine = new RuleScriptEngine
{
    WorkingDirectory = @"C:\rules"
};

var result = engine.TryAnalyze(craneScript, @"eqp\crane.rules");

Relative imports inside the analyzed script are resolved from the source file directory instead of always using WorkingDirectory. For example, when analyzing eqp/crane.rules, import "port" as port; resolves to eqp/port.rules.

The previous overloads continue to resolve imports from WorkingDirectory.

Validation

The release is covered by regression tests for:

  • strict Analyze resolving imports relative to the supplied source file
  • best-effort TryAnalyze resolving imports relative to the supplied source file, including incomplete editor buffers