fix(scripting): #1056 refuse a {{equip}} token in a verbatim/raw/interpolated path literal — editor diagnostic + deploy-gate refusal

This commit is contained in:
Joseph Doherty
2026-12-03 15:05:40 -05:00
parent 16c8b7ffad
commit e840ec1fbc
6 changed files with 211 additions and 2 deletions
@@ -112,6 +112,13 @@ public sealed class RoslynDeployScriptChecker : IDeployScriptChecker
var source = request.Source ?? string.Empty;
try
{
// lmxopcua#1056: a {{equip}} token in a verbatim/raw/interpolated path literal is never substituted, so the
// script would compile and then read a tag path that cannot resolve. The editor runs the same scan.
var unsubstituted = EquipTokenLiteralScanner.Find(source);
if (unsubstituted.Count > 0)
return new CachedVerdict(
["equip token not substituted — " + string.Join("; ", unsubstituted.Select(f => f.Message))],
Cacheable: true);
if (request.Kind == ScriptContextKind.AlarmPredicate)
{
var extraction = DependencyExtractor.Extract(source);