Skip to content

Commit 09180b7

Browse files
authored
feat: support --replica for dfx start (#4014)
1 parent 74b110a commit 09180b7

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Users can surpress this error by setting `export DFX_WARNING=-mainnet_plaintext_
1414

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

17+
### feat: support `--replica` in `dfx start`
18+
19+
Added a flag `--replica` to `dfx start`. This flag currently has no effect.
20+
Once PocketIC becomes the default for `dfx start` this flag will start the replica instead.
21+
You can use the `--replica` flag already to write scripts that anticipate that change.
22+
1723
# 0.24.3
1824

1925
### feat: Bitcoin support in PocketIC

docs/cli-reference/dfx-start.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ You can use the following optional flags with the `dfx start` command.
2525
| `--enable-bitcoin` | Enables bitcoin integration. |
2626
| `--enable-canister-http` | Enables canister HTTP requests. (deprecated: now enabled by default) |
2727
| `--pocketic` | Runs [PocketIC](https://github.com/dfinity/pocketic) instead of the replica. |
28+
| `--replica` | Runs the replica instead of [PocketIC](https://github.com/dfinity/pocketic). |
2829

2930
## Options
3031

src/dfx/src/commands/start.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ pub struct StartOpts {
8585
/// Runs PocketIC instead of the replica
8686
#[clap(long, alias = "emulator")]
8787
pocketic: bool,
88+
89+
/// Runs the replica instead of pocketic.
90+
/// Currently this has no effect.
91+
#[clap(long, conflicts_with = "pocketic")]
92+
#[allow(unused)]
93+
replica: bool,
8894
}
8995

9096
// The frontend webserver is brought up by the bg process; thus, the fg process
@@ -152,6 +158,7 @@ pub fn exec(
152158
artificial_delay,
153159
domain,
154160
pocketic,
161+
replica: _,
155162
}: StartOpts,
156163
) -> DfxResult {
157164
if !background {

0 commit comments

Comments
 (0)