From 74659301e70825387b901bb73888b32adcc5c980 Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Mon, 16 Jan 2023 13:18:34 +0100 Subject: [PATCH] Make sure import/export resolution does not bring duplicates (#4037) Component Groups may add additional modules to compilation. This change ensures that whatever modules result from import/export resolution, they are not duplicate. Not only could that lead to unnecessary compilation but also to multiple reports of the same error which would be confusing to users. This fixes https://www.pivotaltracker.com/story/show/184189980 # Important Notes No easy way to write unit tests for this, so skipping that on purpose for now. --- engine/runtime/src/main/scala/org/enso/compiler/Compiler.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/runtime/src/main/scala/org/enso/compiler/Compiler.scala b/engine/runtime/src/main/scala/org/enso/compiler/Compiler.scala index 5a3dacc354..3d2436bd1e 100644 --- a/engine/runtime/src/main/scala/org/enso/compiler/Compiler.scala +++ b/engine/runtime/src/main/scala/org/enso/compiler/Compiler.scala @@ -256,7 +256,7 @@ class Compiler( } else { modules } - } + }.distinct var hasInvalidModuleRelink = false if (irCachingEnabled) {