From 544d5ef0b6fc4ffe2e185545dbbcaba572fde0b0 Mon Sep 17 00:00:00 2001 From: Reid 'arrdem' McKenzie Date: Thu, 12 Aug 2021 14:16:39 -0600 Subject: [PATCH] Uniq the imports --- zapp/zapp.bzl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zapp/zapp.bzl b/zapp/zapp.bzl index 46b298b..353c895 100644 --- a/zapp/zapp.bzl +++ b/zapp/zapp.bzl @@ -3,6 +3,7 @@ An implementation of driving zappc from Bazel. """ +load("@bazel_skylib//lib:collections.bzl", "collections") load("@rules_python//python:defs.bzl", "py_library", "py_binary") @@ -71,12 +72,12 @@ def _zapp_impl(ctx): ] # Find the list of directories to add to sys - import_roots = [ + import_roots = collections.uniq([ r for r in ctx.attr.src[PyInfo].imports.to_list() ] + [ # The workspace root is implicitly an import root ctx.workspace_name - ] + ]) for r0 in import_roots: for r1 in import_roots: