-
Notifications
You must be signed in to change notification settings - Fork 811
Conversation
Add related tests
…rect child of build_directory
@@ -89,18 +99,19 @@ class ProjectFsWatcher extends EventEmitter { | |||
) { | |||
this.startWatchingContracts(); | |||
} | |||
|
|||
if (tail[0] && filename === path.basename(tail[0])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this and lines 97/98 (won't let met comment there) should not be using the basename function, and be more something like
path.join(head, filename) === path.normalize(this.project.config.contracts_build_directory)
I don't think it's an issue either way as startWatchingContracts()
will check to see if the directory exists before watching. Food for thought
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If tests pass, and you verified this solves the issue, and you have verified that it works with default settings still (it should), this LGTM!
My other comment is for you to decide if you want to change it or not. Either way, has my approval.
Yup, tested with |
Just wanted to comment that I've tested this with |
Fixes #1078
This PR does the following:
contracts_build_directory
needing to be a direct child ofbuild_directory
(which defaults to./build
) to get a Truffle project to link.contracts_build_directory
as deep as you want as a descendant of your Truffle project. (e.g.path/to/project/a/b/c/d/contracts_build_directory
)contracts_build_directory
outside of your Truffle project (i.e. not a descendant).It does not do:
develop
and this branch, if you rename a contract's file name, all other contracts in Ganache disappear. If you try to rename it back to the original name, nothing changes. I considered this out of scope, will open a new issue for this.contracts_build_directory
. Didn't seem like it was in scope for this card. If enough people want it, then a new issue/feature request should be made.FYI:
contracts_build_directory
inside their project anyways, so this shouldn't be too big of an issue, but if you think it is let me know.