Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Add default networks in config file #7

Closed
wants to merge 1 commit into from
Closed

Conversation

wbt
Copy link
Contributor

@wbt wbt commented Oct 16, 2018

so that somebody coming in new and following the instructions (including truffle migrate or truffle test) doesn't get Error: No network specified. Cannot determine current network. The aim of this is to make on-boarding into Truffle easier.

@eggplantzzz
Copy link
Contributor

eggplantzzz commented Jan 3, 2019

@wbt Thanks for opening this and sorry for the lengthy delay in getting around to this. I think this change in principal is great! However, we removed truffle.js in favor of truffle-config.js. Also I think we want the defaults commented out by default. We are going to be having a discussion tomorrow about what default ports to use etc. and should have some more direction for you next week...that is if you are still interested in contributing!
Let us know if you have time to make these changes and we'll get back to you next week. If not that's fine too, I will have time to work on this if that is the case.

@wbt
Copy link
Contributor Author

wbt commented Jan 4, 2019

I do not think we want the defaults commented out by default; I think it would be better for the system to work right after unboxing and in line with tutorials/documentation. If you don't want to make things easier and more plug-and-play for people, why even have the box system or many of the other features and functions that make getting into blockchain development easier and simpler?

This seems to be a case where starting with a sensible default, which generally causes no harm if left in as active, compared to leaving it out or having it commented. If it doesn't match the user's setup they have to do the same work to find and change the config, and in the common case where it does, you're saving people time, effort, and frustration, making development easier and supporting the point of using Truffle.

It's a simple copy/paste change; just point me to the new file when it's ready and I'll be glad to pop it in. If I get hit by a bus or something and am too slow to respond, don't let that slow things down.

@eggplantzzz
Copy link
Contributor

@gnidan You want to weigh in about having the network config stuff commented out or not?

@gnidan
Copy link
Contributor

gnidan commented Jan 7, 2019

Sure thing!

So my thinking on this is that we want the boxes to work out of the box for testing without having to run Ganache.

In order for that to hold true, we can't have a development network defined, or a test network that says to connect to Ganache. Otherwise truffle test will just fail unless you have a separate node running.

A sensible solution to me seems that we should have those commented out. If the user wishes to run Ganache, then they can just uncomment the networks.

@eggplantzzz
Copy link
Contributor

@wbt So there are two things to do before this can be merged:

  • Make the changes you made in truffle-config.js and delete truffle.js as that is what we will use for the Truffle config moving forward
  • Comment out the changes in the config
    Do you have time for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants