Skip to content

Commit

Permalink
chore: --emulator parameter is deprecated (#3295)
Browse files Browse the repository at this point in the history
* chore: --emulator parameter is deprecated

* add deprecation note to md documentation
  • Loading branch information
mraszyk authored Aug 15, 2023
1 parent ae93449 commit a31765c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# UNRELEASED

### chore: --emulator parameter is deprecated and will be discontinued soon

Added warning that the `--emulator` is deprecated and will be discontinued soon.

### fix: node engines in starter

Updates node engines to reflect the same engines supported in agent-js.
Expand Down
2 changes: 1 addition & 1 deletion docs/cli-reference/dfx-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can use the following optional flags with the `dfx start` command.
|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--background` | Starts the local canister execution environment and web server processes in the background and waits for a reply before returning to the shell. |
| `--clean` | Starts the local canister execution environment and web server processes in a clean state by removing checkpoints from your project cache. You can use this flag to set your project cache to a new state when troubleshooting or debugging. |
| `--emulator` | Starts the [IC reference emulator](https://github.com/dfinity/ic-hs) rather than the replica. |
| `--emulator` | Starts the [IC reference emulator](https://github.com/dfinity/ic-hs) rather than the replica. (deprecated: will be discontinued soon) |
| `--enable-bitcoin` | Enables bitcoin integration. |
| `--enable-canister-http` | Enables canister HTTP requests. (deprecated: now enabled by default) |

Expand Down
1 change: 1 addition & 0 deletions src/dfx/src/commands/replica.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ pub fn exec(
enable_bitcoin,
bitcoin_node,
enable_canister_http,
emulator
)?;

let local_server_descriptor = network_descriptor.local_server_descriptor()?;
Expand Down
9 changes: 9 additions & 0 deletions src/dfx/src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ pub fn exec(
enable_bitcoin,
bitcoin_node,
enable_canister_http,
emulator,
)?;

let local_server_descriptor = network_descriptor.local_server_descriptor()?;
Expand Down Expand Up @@ -441,6 +442,7 @@ pub fn apply_command_line_parameters(
enable_bitcoin: bool,
bitcoin_nodes: Vec<SocketAddr>,
enable_canister_http: bool,
emulator: bool,
) -> DfxResult<NetworkDescriptor> {
if enable_canister_http {
warn!(
Expand All @@ -450,6 +452,13 @@ pub fn apply_command_line_parameters(
warn!(logger, "Canister HTTP suppport is enabled by default. It can be disabled through dfx.json or networks.json.");
}

if emulator {
warn!(
logger,
"The --emulator parameter is deprecated and will be discontinued soon."
);
}

let _ = network_descriptor.local_server_descriptor()?;
let mut local_server_descriptor = network_descriptor.local_server_descriptor.unwrap();

Expand Down

0 comments on commit a31765c

Please sign in to comment.