flow-cli
flow-cli copied to clipboard
Flow emulator cannot be started with custom emulator
Problem
When emulator name is changed from "default" to something else, we get an error message saying “no default emulator account”. This means that currently flow cli users can’t start emulator with their custom emulator.
Steps to Reproduce
- change the emulator name from “default” to something else
- start emulator
Acceptance Criteria
Users should be able to start emulator with non default emulator.
Was this fixed @sukantoraymond ?
Do we want to support multiple emulators?
I always though it is some kind of default setting place, more like:
"emulator": {
"defaultPort": 3569,
"defaultServiceAccount": "emulator-account2"
}
Actually default port doesn't make sense anymore, ( there is rest port , grpc port etc )
Maybe we can just add emulator launch option with an account:
flow emulator --service-account emulatorAccountX --rest-port 8888
Also it would be nice to have, on port clash, to listen on some empty random port. ( if we will run multiple emulators )
Yes, this configuration was removed from flow.json and it will potentially be removed altogether if it won't be used. As we are adding some usage metrics we will be able to make better-informed decisions. What you wrote makes 100% sense as the next step in my mind. I don't think "other tools" should have configuration in flow.json, it should stay generic. We will be adding more and more tools into the CLI and it's better to isolate it from that and in that perspective emulator is also "another tool"
Thanks for the feedback, will start working on this
@sukantoraymond what is the status of this?
Will put this in this sprint's backlog @sideninja
@sideninja and I came to conclusion that we won't enable customizations on emulator through flow.json. Please see the PR thread for more inf.