💥 Proposal
Currently, leo add may either:
- point to a local dependency
- point to a virtual yet-to-be-downloaded runtime network dependency
However, the difference in behaviour as well as the resulting program.json entry is confusing:
"location": "network",
"path": null
I would propose for --network to require a <URL> parameter, and to immediately download the dependency, e.g. from a local devnet or from canary/testnet/mainnet.
The only reason I can imagine for requiring a dynamic network fetch, is when the user is testing and deploying multiple novel programs. In which case, they will by necessity have defined them locally anyway.
To maintain backwards compatible, we could adjust the CLI behaviour, but still support location: network in program.json for a while or potentially forever.
💥 Proposal
Currently,
leo addmay either:However, the difference in behaviour as well as the resulting
program.jsonentry is confusing:I would propose for
--networkto require a<URL>parameter, and to immediately download the dependency, e.g. from a local devnet or from canary/testnet/mainnet.The only reason I can imagine for requiring a dynamic network fetch, is when the user is testing and deploying multiple novel programs. In which case, they will by necessity have defined them locally anyway.
To maintain backwards compatible, we could adjust the CLI behaviour, but still support
location: networkinprogram.jsonfor a while or potentially forever.