-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Truffle should warn you if you have two contracts with the same name in different folders #387
Comments
Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem. |
I think it's still valid |
Thanks for your response! This issue is no longer considered stale and someone from the Truffle team will try to respond as soon as they can. |
Thank you for raising this issue! It has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you would like to keep this issue open, please respond with information about the current state of this problem. |
Not stale again. |
Thanks for your response! This issue is no longer considered stale and someone from the Truffle team will try to respond as soon as they can. |
Task DescriptionAdd a warning on the console output of Acceptance criteria
Required skills
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 200.0 DAI (200.0 USD @ $1.0/DAI) attached to it.
|
Note: the bounty is funded by Trail of Bits |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work has been started. These users each claimed they can complete the work by 2 weeks, 5 days from now. 1) jeremigendron has applied to start work (Funders only: approve worker | reject worker). Figure out where contract compilation occurs, log the output from that and check to see if contracts with the same name aren't processed specially (which they should be, in this case with a warning to the console). I've encountered this problem myself working with the Truffle Suite. Worked previously on Truffle project, this one should be an easy fix. Will add necessary changes. There are a couple of places where we can check for contract name duplicity:
One additional complexity here that needs to be solved is the limited "view" of the compilation targets under a Check list of contracts during compilation. If multiple exist exist with same name, throw error. I will make Truffle check for contracts with the same name during compilation and fail with an error if there are any. I will also add a flag to disable this check. Learn more on the Gitcoin Issue Details page. |
…ntracts Also, included changes to the logging of warnings for cleaner output; and extra support in the test/ folder so you can check it out cd packages/workflow-compile && yarn test > Compilation warnings encountered: Detected duplicate contracts: SimpleStorage
@KiChjang Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days |
@gitcoinbot Working on it, problem now is to write effective tests that can show that the bug is fixed by my changes. |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work for 200.0 DAI (200.0 USD @ $1.0/DAI) has been submitted by: @ceresstation please take a look at the submitted work:
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done The funding of 200.0 DAI (200.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @KiChjang.
|
Issue
I just spent a couple of hours trying to understand, why didn't the functions of my contract appear in an ABI after compilation.
The reason was - that I had two contracts with the same name in different folders.
Steps to Reproduce
Create two different contracts with the same name in different folders
Expected Behavior
Truffle would give you an error during compilation
Actual Results
Compilation was successful and it just overrided the json artifacts of the previous contract
Environment
The text was updated successfully, but these errors were encountered: