Skip to content

Commit

Permalink
Merge pull request #1712 from demergent-labs/update_dfx_0_18_0
Browse files Browse the repository at this point in the history
update to dfx 0.18.0, change hello_world README, get rid of rust version, remove awaits
  • Loading branch information
lastmjs authored Mar 29, 2024
2 parents 85236b7 + 8e519e5 commit 21815e0
Show file tree
Hide file tree
Showing 81 changed files with 12 additions and 159 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- if: contains(github.head_ref, 'release--')
name: Install dfx
run: |
DFXVM_INIT_YES=true DFX_VERSION=0.17.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
DFXVM_INIT_YES=true DFX_VERSION=0.18.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH
# TODO we should use some Action-specific bot account
- if: contains(github.head_ref, 'release--')
Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:
- if: ${{ needs.release-candidate-deploy.outputs.should_run_tests }}
name: Install dfx
run: |
DFXVM_INIT_YES=true DFX_VERSION=0.17.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
DFXVM_INIT_YES=true DFX_VERSION=0.18.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH
- if: ${{ needs.release-candidate-deploy.outputs.should_run_tests }}
uses: actions/cache@v3
Expand Down
2 changes: 0 additions & 2 deletions benchmark/setup.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

export async function run_setup(argument?: string) {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister create azle`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/apollo_server/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code apollo_server || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/async_await/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code async_await || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/audio_recorder/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code audio_recorder || true`, {
stdio: 'inherit'
});
Expand Down
5 changes: 4 additions & 1 deletion examples/bitcoin/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
"networks": {
"local": {
"bind": "127.0.0.1:8000",
"type": "ephemeral"
"type": "ephemeral",
"replica": {
"subnet_type": "system"
}
}
},
"defaults": {
Expand Down
2 changes: 0 additions & 2 deletions examples/blob_array/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code blob_array || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/bytes/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code bytes_canister || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/call_raw/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code call_raw || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/candid_encoding/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code candid_encoding || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/candid_keywords/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code candid_keywords || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/canister/test/pretest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { execSync } from 'child_process';
import { getCanisterId } from 'azle/dfx';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code canister || true`, {
stdio: 'inherit'
});
Expand Down
5 changes: 4 additions & 1 deletion examples/ckbtc/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@
"networks": {
"local": {
"bind": "127.0.0.1:8000",
"type": "ephemeral"
"type": "ephemeral",
"replica": {
"subnet_type": "system"
}
}
},
"defaults": {
Expand Down
2 changes: 0 additions & 2 deletions examples/ckbtc/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

uninstall(
'ckbtc',
'internet_identity',
Expand Down
2 changes: 0 additions & 2 deletions examples/complex_init/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code complex_init || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/complex_types/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code complex_types || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/composite_queries/test/pretest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { getCanisterId } from 'azle/dfx';
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code canister1 || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/counter/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code counter || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/cross_canister_calls/test/pretest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { getCanisterId } from 'azle/dfx';
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code canister1 || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/cycles/test/pretest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { getCanisterId } from 'azle/dfx';
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code cycles || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/date/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code date || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/ethereum_json_rpc/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code ethereum_json_rpc || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/ethers/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code ethers || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/express/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code express || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/file_protocol/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code backend || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/fs/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code fs || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/func_types/test/pretest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { getCanisterId } from 'azle/dfx';
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code func_types || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/generics/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code generics || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/guard_functions/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code guard_functions || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/heartbeat/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code heartbeat_async || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ node --version
Install the dfx command line tools for managing ICP applications:

```bash
DFX_VERSION=0.16.1 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
DFX_VERSION=0.18.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
```

Check that the installation went smoothly by looking for clean output from the following command:
Expand Down
2 changes: 0 additions & 2 deletions examples/ic_api/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code ic_api || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/icrc/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest(icrcPath: string) {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code proxy || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/imports/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code imports || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/init/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code init || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/inspect_message/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code inspect_message || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/key_value_store/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code key_value_store || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/ledger_canister/test/pretest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { execSync } from 'child_process';
import { getCanisterId } from 'azle/dfx';

async function pretest(icp_ledger_path: string) {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code icp_ledger || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/list_of_lists/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code list_of_lists || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/management_canister/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code management_canister || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/manual_reply/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code manual_reply || true`, {
stdio: 'inherit'
});
Expand Down
2 changes: 0 additions & 2 deletions examples/motoko_examples/calc/test/pretest.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { execSync } from 'child_process';

async function pretest() {
await new Promise((resolve) => setTimeout(resolve, 5000));

execSync(`dfx canister uninstall-code calc || true`, {
stdio: 'inherit'
});
Expand Down
Loading

0 comments on commit 21815e0

Please sign in to comment.