-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Make Truffle provider creation lazy #1526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@frangio note that you can assign a function that returns the provider to the |
|
@spalladino Oh cool! Thanks, I'll use that feature. |
…y into fix-truffle-termination
|
Yay, it works! From my local testing this also seems to fix #1340. How did you figure it out? Regarding the fix, do we actually need to have the ropsten network defined? I'd remove the whole thing and drop the |
|
I removed most contracts and it still wasn't working and I just figured that the config was the only other thing that could be failing because I was told that other projects weren't having this problem. Do we need any network other than ganache? I think we used them for EthPM deployment, but that wan't working anyway (though it may be fixable by now, see #824). |
|
If you're sure that it fixes #1340 feel free to add the |
|
In that case I'd remove the ropsten config, and add it back when (if) the fix the EthPM issue, or any other issue that requires it. |
|
Also removed the |
nventuro
left a comment
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.
Nice! Can we also get rid of truffle-hdwallet-provider?
|
Seems so! |
|
Looks like we have an implicit dependency on |
e81a895 to
49bc316
Compare
nventuro
left a comment
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.
Awesome! 🎉
* remove note that was fixed in #1526 * add build script * add prepack script * remove custom compilation steps
Fixes #1516
Fixes #1340
It seems like the creation of an
HDWalletProviderobject was blocking Truffle from exiting. I'm guessing this was because of some pending promise, probably related to a network connection that is started. This was completely unnecessary for the general use case of compiling or running the tests against Ganache, so I made the creation of this provider lazy using a JavaScript getter as seen here.To be honest, I haven't tested the provider defined in this way. :-) I just know that it fixes the problem we were having.