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
Analyzeresolving imports relative to the supplied source file - best-effort
TryAnalyzeresolving imports relative to the supplied source file, including incomplete editor buffers