Skip to content

Commit

Permalink
feat: support --replica for dfx start (#4014)
Browse files Browse the repository at this point in the history
  • Loading branch information
sesi200 authored Nov 25, 2024
1 parent 74b110a commit 09180b7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Users can surpress this error by setting `export DFX_WARNING=-mainnet_plaintext_

The warning won't display when executing commands like `dfx deploy --playground`.

### feat: support `--replica` in `dfx start`

Added a flag `--replica` to `dfx start`. This flag currently has no effect.
Once PocketIC becomes the default for `dfx start` this flag will start the replica instead.
You can use the `--replica` flag already to write scripts that anticipate that change.

# 0.24.3

### feat: Bitcoin support in PocketIC
Expand Down
1 change: 1 addition & 0 deletions docs/cli-reference/dfx-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ You can use the following optional flags with the `dfx start` command.
| `--enable-bitcoin` | Enables bitcoin integration. |
| `--enable-canister-http` | Enables canister HTTP requests. (deprecated: now enabled by default) |
| `--pocketic` | Runs [PocketIC](https://github.com/dfinity/pocketic) instead of the replica. |
| `--replica` | Runs the replica instead of [PocketIC](https://github.com/dfinity/pocketic). |

## Options

Expand Down
7 changes: 7 additions & 0 deletions src/dfx/src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ pub struct StartOpts {
/// Runs PocketIC instead of the replica
#[clap(long, alias = "emulator")]
pocketic: bool,

/// Runs the replica instead of pocketic.
/// Currently this has no effect.
#[clap(long, conflicts_with = "pocketic")]
#[allow(unused)]
replica: bool,
}

// The frontend webserver is brought up by the bg process; thus, the fg process
Expand Down Expand Up @@ -152,6 +158,7 @@ pub fn exec(
artificial_delay,
domain,
pocketic,
replica: _,
}: StartOpts,
) -> DfxResult {
if !background {
Expand Down

0 comments on commit 09180b7

Please sign in to comment.