Skip to content

[Proposal] Ensure leo add always stores dependencies locally #28750

Description

@vicsn

💥 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Q4proposalA proposal for something new.🖥️ CLIAnything related to the Leo CLI.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions