From 0858e10a287ed8d64cdbec32b15270d236fc58f8 Mon Sep 17 00:00:00 2001 From: Tom Clarke Date: Tue, 24 Nov 2020 23:17:30 +0000 Subject: [PATCH] relax I/O checking on custom components for better UX --- src/Renderer/Simulator/CanvasStateAnalyser.fs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Renderer/Simulator/CanvasStateAnalyser.fs b/src/Renderer/Simulator/CanvasStateAnalyser.fs index ac2853a80..f31330392 100644 --- a/src/Renderer/Simulator/CanvasStateAnalyser.fs +++ b/src/Renderer/Simulator/CanvasStateAnalyser.fs @@ -351,9 +351,11 @@ type CustomComponentError = let checkCustomComponentForOkIOs (c:Component) (args:CustomComponentType) (sheets: LoadedComponent list)= let inouts = args.InputLabels,args.OutputLabels let name = args.Name + let compare labs1 labs2 = + (labs1 |> Set) = (labs2 |> Set) sheets |> List.tryFind (fun sheet -> sheet.Name = name) - |> Option.map (fun sheet -> sheet, sheet.InputLabels = args.InputLabels, sheet.OutputLabels = args.OutputLabels) + |> Option.map (fun sheet -> sheet, compare sheet.InputLabels args.InputLabels, compare sheet.OutputLabels args.OutputLabels) |> function | None -> Error ( c, NoSheet name) | Some(_, true,true) -> Ok ()