Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove build manifest, replace with other files (see details) #780

Closed
hansl opened this issue Jul 6, 2020 · 1 comment
Closed

Remove build manifest, replace with other files (see details) #780

hansl opened this issue Jul 6, 2020 · 1 comment
Assignees
Milestone

Comments

@hansl
Copy link
Contributor

hansl commented Jul 6, 2020

Because of 2 competing requirements;

  • local canister IDs should be tied to the replica state
  • tungsten canister IDs should be version controlled and cloned

We need to have two ways of containing canister IDs; one that is persisted in version control and one that isn't.

Because of this, we allow people to specify an type in their dfx.json networks keys, which is one of two values:

  • ephemeral, which is the default for local. The canister_ids.json files will be created inside .dfx.
  • persistent, which is the default for non-local networks. The canister_ids.json file in the root will be updated when creating canister IDs.

The format for the canister_ids.json file is the same regardless of where it is created;

{
  "CANISTER_NAME": {
    "NETWORK_NAME": "ic:123456"
  }
}

where NETWORK_NAME can be local, or tungsten or else.

@hansl hansl added this to the Tungsten milestone Jul 6, 2020
mergify bot pushed a commit that referenced this issue Jul 15, 2020
Implements #780

Removed the canister manifest (which had one canister ID per canister, as well as paths to outputs) and replaced it with two files:
- `.dfx/canister_ids.json`: stores ephemeral canister ids for (typically) local "networks"
- `canister_ids.json`: stores persistent canister ids for (typically) remote networks.

The `dfx create` command populates these files, while other commands use the values.

Added a `NetworkDescriptor` field to `Environment` (though really only `AgentEnvironment`), in order to tell which `canister_ids.json` file to use.

Added to dfx.json `networks` a `type` field ("persistent" or "ephemeral")
@ericswanson-dfinity
Copy link
Member

This is complete.

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

No branches or pull requests

2 participants