I’ve been facing this odd error when trying to run...
# general
w
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
Hmm, that sounds like a bug. What are the duplicates?
👀 1
And can you create a redacted dummy repo that reproduces this issue?
w
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
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
Got it, I’ll upgrade it to 2.13.0a1
Tks, Benjy!
It worked like a charm, both
fmt
and
lint
. 🎉
h
Excellent!