https://pantsbuild.org/ logo
#general
Title
# general
w

wooden-thailand-8386

07/12/2022, 8:51 PM
I’ve been facing this odd error when trying to run
./pants lint terraform::
Copy code
16:47:26.09 [ERROR] 1 Exception encountered:

  Exception: Can only merge Directories with no duplicates, but found 2 duplicate entries in :
I have multiple modules in different folder that have different names but the files within share the same names such as “main.tf”, “variables.tf” and “outputs.tf”. No idea what to do.
1
h

happy-kitchen-89482

07/12/2022, 10:15 PM
Hmm, that sounds like a bug. What are the duplicates?
👀 1
And can you create a redacted dummy repo that reproduces this issue?
w

wooden-thailand-8386

07/13/2022, 1:18 PM
Let me give it a try
This mock fails to me with the same error
Copy code
❯ ./pants lint ::
09:26:49.42 [ERROR] 1 Exception encountered:

  Exception: Can only merge Directories with no duplicates, but found 2 duplicate entries in :

`terraform`: 1.) file digest=83a91173e1a0ff8c3bb0503f80754a0dd38319a6fae86ed156a870bfc3ce785b size=79441792:

����
H__PAGEZEROx__TEXT�o�o__text__TEXTnD��__symbol_stub1__TEXT�T�H�T�__rodata__TEXT�W�ٔ��W�__typelink__TEXT���J��__itablink__TEXT`7�xv`7�__gosymtab__TEXTح�ح�__gopclntab__TEXT୆p=�୆(__DATA�o���o�k__go_buildinfo__DATA�o �o__nl_symbol_ptr__DATA �op �o�__noptrdata__DATA��oR���o
... TRUNCATED contents from 79441792B to 1024B (Pass -ldebug to see full contents).

`terraform`: 2.) dir digest=9fbf61e118d8867883ba5f8d1d0f396b1f63f7328e6231ba76eef29bfa47455f size=179:
👍 1
h

happy-kitchen-89482

07/13/2022, 3:39 PM
OK this reproduces. Can you file a bug on https://github.com/pantsbuild/pants with all this info so we can track it? Thanks!
Actually, I don't reproduce this on latest main
So maybe this was already fixed
Yep, looks like this is fixed in 2.13.0a1
w

wooden-thailand-8386

07/13/2022, 3:49 PM
Got it, I’ll upgrade it to 2.13.0a1
Tks, Benjy!
It worked like a charm, both
fmt
and
lint
. 🎉
h

happy-kitchen-89482

07/13/2022, 4:02 PM
Excellent!
8 Views