I got an error in my project
[https://github.com/Cirru/interpreter.nim](https://github.com/Cirru/interpreter.nim)
=>> nimble build
Verifying dependencies for [email protected]
Installing cirru-parser@>= 0.0.3
Downloading https://github.com/Cirru/parser.nim using git
Verifying dependencies for [email protected]
Installing [email protected]
Prompt: [email protected] already exists. Overwrite? [y/N]
Answer: y
Success: cirruParser installed successfully.
Building cirruInterpreter/main using c backend
Tip: 10 messages have been suppressed, use --verbose to show them.
Error: Build failed for package: cirruInterpreter
... Details:
... Execution failed with exit code 1
... Command: "/usr/local/Cellar/nim/0.20.2/nim/bin/nim" c
--noBabelPath
--path:"/var/folders/6p/qnt9f2tn4p5gmchth6g7brjm0000gn/T/nimble_52915/githubcom_Cirruparsernim_0.0.3/src"
-o:"/Users/chen/repo/cirru/interpreter.nim/out/main"
"/Users/chen/repo/cirru/interpreter.nim/src/main.nim"
... Output: Hint: used config file
'/usr/local/Cellar/nim/0.20.2/nim/config/nim.cfg' [Conf]
... Hint: system [Processing]
... Hint: widestrs [Processing]
... Hint: io [Processing]
... Hint: main [Processing]
... Hint: os [Processing]
... Hint: strutils [Processing]
... Hint: parseutils [Processing]
... Hint: math [Processing]
... Hint: bitops [Processing]
... Hint: macros [Processing]
... Hint: algorithm [Processing]
... Hint: unicode [Processing]
... Hint: pathnorm [Processing]
... Hint: osseps [Processing]
... Hint: posix [Processing]
... Hint: times [Processing]
... Hint: options [Processing]
... Hint: typetraits [Processing]
... Hint: re [Processing]
... Hint: pcre [Processing]
... Hint: rtarrays [Processing]
... Hint: cirruParser [Processing]
... Hint: json [Processing]
... Hint: hashes [Processing]
... Hint: tables [Processing]
... Hint: lexbase [Processing]
... Hint: streams [Processing]
... Hint: parsejson [Processing]
... Hint: types [Processing]
... Hint: lexer [Processing]
... Hint: strformat [Processing]
... Hint: transformer [Processing]
... Hint: helpers [Processing]
... Hint: sequtils [Processing]
... Hint: types [Processing]
... /Users/chen/repo/cirru/interpreter.nim/src/main.nim(11, 24)
Error: redefinition of 'types'; previous declaration here:
/Users/chen/repo/cirru/interpreter.nim/src/cirruInterpreter/types.nim(1, 2)
Run
The error
... /Users/chen/repo/cirru/interpreter.nim/src/main.nim(11, 24)
Error: redefinition of 'types'; previous declaration here:
/Users/chen/repo/cirru/interpreter.nim/src/cirruInterpreter/types.nim(1, 2)
Run
was caused by the filename cirruInterpreter/types.nim, which is duplicated with
the name in cirruParser/types.nim. I can fix the error by rename the file to
cirruInterpreter/interpreterTypes.nim. But it looks quite strange.
Was it by design that we can't have same filenames in one build even through
they are in different packages? Is there any quick fix that I can use the
filename types.nim again?