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

Deploying via ganache should rewrite truffle-config #249

Open
emilyJLin95 opened this issue Oct 27, 2022 · 2 comments
Open

Deploying via ganache should rewrite truffle-config #249

emilyJLin95 opened this issue Oct 27, 2022 · 2 comments

Comments

@emilyJLin95
Copy link

When I deploy on VS Code on ganache, it rewrites the truffle-config

Additionally, is there a way to not add the loc_local_ prefix? It gets confusing to remember when i want to do --network ganache_name

@xhulz xhulz self-assigned this Nov 3, 2022
@xhulz
Copy link
Contributor

xhulz commented Nov 14, 2022

Hi @emilyJLin95,

Ok, I just removed the loc in front of the network name and kept just the name as it is displayed inside the network view panel.

About VSCode rewrites truffle-config.js

There are some points that we need to bring to the table. Today, we have the network view panel, that the user is free to create a new network or connect to one previously existent. Given that, there are 2 scenarios here:

  1. If we leave the combobox with only the networks that are inside the truffle-config.js, this can cause a strangeness to the users and they considering it a bug, because the items from the network view panel, are not showing up as a target for deploy

  2. If we decide to keep it the same way (all networks showing up), but avoid rewriting the truffle-config.js, we won't be able to make a deploy for networks coming from the network view panel, because we must have the network target written inside the truffle-config.js in order to execute a deploy. In this specific case, the extension is trying to be proactive, modifying the configuration file to allow users do a deploy.

IMHO, maybe we can create a different style to show the network information inside the combobox. Something like
separate the networks that are coming from the the truffle-config.js to the ones that have been coming from the network view panel. Below these last ones, we can add a warning saying something like: choosing this network, your deploy will be done and your truffle-config.js will be modified.

Thoughts?

@kevinbluer for visibility

@acuarica
Copy link
Contributor

We might get rid of this issue altogether when/if trufflesuite/truffle#5701 gets implemented. Because if it gets implemented, a new --url flag will be introduced. This flag that allows us to pass down the network, instead of re-writing truffle-config.js.

@xhulz xhulz removed their assignment Nov 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants