You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
When compiling unboxed metacoin project on windows it complains that Duplicate Contract names found for ConvertLib
Seems that there is a path.sep issue here. When import './ConvertLib.sol'; is processed it resolves to 'C:\\Users\\amal-admin\\dev\\mc\\contracts\\ConvertLib.sol' which uses a different path.sep from other compilationTargets. See trace below for context
C:\Users\amal-admin\dev\mc>truffle compile
Compiling your contracts...
===========================
> Compiling .\contracts\ConvertLib.sol
> Compiling .\contracts\MetaCoin.sol
> Compiling .\contracts\Migrations.sol
> Compiling .\contracts\ConvertLib.sol
> Artifacts written to C:\Users\amal-admin\dev\mc\build\contracts
> Compiled successfully using:
- solc: 0.5.16+commit.9c3226ce.Emscripten.clang
> Duplicate contract names found for ConvertLib.
> This can cause errors and unknown behavior. Please rename one of your contracts.
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19043 N/A Build 19043
C:\Users\amal-admin\dev\mc>truffle version
Truffle v5.4.1 (core: 5.4.1)
Solidity v0.5.16 (solc-js)
Node v14.17.3
Web3.js v1.4.0
The text was updated successfully, but these errors were encountered:
To be clear, those double-backslashes are actually single backslashes, right? You just copied and pasted them out of a string literal? That's what it looks like from the DEBUG dump you posted.
When compiling unboxed metacoin project on windows it complains that
Duplicate Contract names found for ConvertLib
Seems that there is a path.sep issue here. When
import './ConvertLib.sol';
is processed it resolves to'C:\\Users\\amal-admin\\dev\\mc\\contracts\\ConvertLib.sol'
which uses a different path.sep from other compilationTargets. See trace below for contextSteps to Reproduce
On windows
Expected Behavior
There should be no duplicate arning
Actual Results
Edited run with DEBUG=*
Environment
The text was updated successfully, but these errors were encountered: