From 62f28216f1d672add389a38c10276dd940c9c9d0 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Mon, 8 Jan 2024 12:07:24 -0800 Subject: [PATCH] chore: remove ic-ref from the binary cache --- CHANGELOG.md | 2 ++ nix/sources.json | 18 ------------------ scripts/update-ic-ref.sh | 19 ------------------- scripts/write-dfx-asset-sources.sh | 2 +- src/dfx/assets/dfx-asset-sources.toml | 8 -------- src/dfx/assets/prepare_assets.rs | 8 ++++---- 6 files changed, 7 insertions(+), 50 deletions(-) delete mode 100755 scripts/update-ic-ref.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b196998f..f5f5ed1849 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The `dfx cycles` command no longer needs nor accepts the `--cycles-ledger-canister-id ` parameter. +### chore: removed ic-ref from the binary cache + # 0.15.3 ### fix: allow `http://localhost:*` as `connect-src` in the asset canister's CSP diff --git a/nix/sources.json b/nix/sources.json index 27451cdae7..e0c9af5fe6 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -106,24 +106,6 @@ "url": "https://download.dfinity.systems/ic/69e1408347723dbaa7a6cd2faa9b65c42abbe861/openssl-static-binaries/x86_64-linux/ic-nns-init.gz", "url_template": "https://download.dfinity.systems/ic//openssl-static-binaries/x86_64-linux/ic-nns-init.gz" }, - "ic-ref-x86_64-darwin": { - "builtin": false, - "rev": "3cc51be58784ba9b6e9a06afb4b59a11fb31c771", - "sha256": "03w92npwpvsrlh4icnq1cpz9dc54wpbqfqvzm1558vglg52nkhg1", - "type": "file", - "url": "https://download.dfinity.systems/ic-ref/ic-ref-0.0.1-a9f73dba-x86_64-darwin.tar.gz", - "url_template": "https://download.dfinity.systems/ic-ref/ic-ref--x86_64-darwin.tar.gz", - "version": "0.0.1-a9f73dba" - }, - "ic-ref-x86_64-linux": { - "builtin": false, - "rev": "3cc51be58784ba9b6e9a06afb4b59a11fb31c771", - "sha256": "1962cb5kyx92ysi6pn81rl48zd1k4r12gc0xbfab5lc79rv6fjaw", - "type": "file", - "url": "https://download.dfinity.systems/ic-ref/ic-ref-0.0.1-a9f73dba-x86_64-linux.tar.gz", - "url_template": "https://download.dfinity.systems/ic-ref/ic-ref--x86_64-linux.tar.gz", - "version": "0.0.1-a9f73dba" - }, "ic-starter-x86_64-darwin": { "builtin": false, "rev": "69e1408347723dbaa7a6cd2faa9b65c42abbe861", diff --git a/scripts/update-ic-ref.sh b/scripts/update-ic-ref.sh deleted file mode 100755 index aad50cd940..0000000000 --- a/scripts/update-ic-ref.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# $1 not set || not running in repo root -if [ -z ${1+x} ] || [ ! -f ./scripts/write-dfx-asset-sources.sh ]; then - echo "Usage: run ./scripts/update-ic-ref.sh in repo root" - exit 1 -fi - -VERSION="0.0.1-$1" -echo "Updating sources to version ${VERSION}" -niv update ic-ref-x86_64-linux -a version=$VERSION -niv update ic-ref-x86_64-darwin -a version=$VERSION - -echo "Writing asset sources" -./scripts/write-dfx-asset-sources.sh - -echo "Done. Don't forget to update CHANGELOG.md" diff --git a/scripts/write-dfx-asset-sources.sh b/scripts/write-dfx-asset-sources.sh index 4ab5e4e989..631f9fec29 100755 --- a/scripts/write-dfx-asset-sources.sh +++ b/scripts/write-dfx-asset-sources.sh @@ -87,7 +87,7 @@ write_replica_rev motoko_base_sha="$(calculate_sha256 "motoko-base")" for platform in "darwin" "linux"; do - for name in "ic-ref" "icx-proxy" "ic-admin" "ic-btc-adapter" "ic-https-outcalls-adapter" "ic-nns-init" "ic-starter" "motoko" "replica" "canister_sandbox" "sandbox_launcher" "sns"; + for name in "icx-proxy" "ic-admin" "ic-btc-adapter" "ic-https-outcalls-adapter" "ic-nns-init" "ic-starter" "motoko" "replica" "canister_sandbox" "sandbox_launcher" "sns"; do if [[ "$name" == "replica" || "$name" == "canister_sandbox" ]]; then echo "# The replica and canister_sandbox binaries must have the same revision." >>"$DFX_ASSET_SOURCES" diff --git a/src/dfx/assets/dfx-asset-sources.toml b/src/dfx/assets/dfx-asset-sources.toml index 225a8f6448..607a569c23 100644 --- a/src/dfx/assets/dfx-asset-sources.toml +++ b/src/dfx/assets/dfx-asset-sources.toml @@ -1,10 +1,6 @@ # generated by write-dfx-asset-sources.sh replica-rev = '69e1408347723dbaa7a6cd2faa9b65c42abbe861' -[x86_64-darwin.ic-ref] -url = 'https://download.dfinity.systems/ic-ref/ic-ref-0.0.1-a9f73dba-x86_64-darwin.tar.gz' -sha256 = 'e1c1694579f46d544aa87f6387d7e5a4b096fe65015b1609a459efcbaf15890f' - [x86_64-darwin.icx-proxy] url = 'https://download.dfinity.systems/ic/69e1408347723dbaa7a6cd2faa9b65c42abbe861/openssl-static-binaries/x86_64-darwin/icx-proxy-dev.gz' sha256 = 'b07f2784abddcb54f0b0d3ce7585b9283cf814870905d58c26a1c8823ead2fdd' @@ -59,10 +55,6 @@ sha256 = '3ee345fb0357ee9305e911d8aa30a00675114c3247af79bb16b8c21f8477dc3c' url = 'https://github.com/dfinity/bitcoin-canister/releases/download/release%2F2023-10-13/ic-btc-canister.wasm.gz' sha256 = '09f5647a45ff6d5d05b2b0ed48613fb2365b5fe6573ba0e901509c39fb9564ac' -[x86_64-linux.ic-ref] -url = 'https://download.dfinity.systems/ic-ref/ic-ref-0.0.1-a9f73dba-x86_64-linux.tar.gz' -sha256 = '5c4967764e87d1b2945b1db027422633b48f08cd01d96ba2f622753fcb62c2a4' - [x86_64-linux.icx-proxy] url = 'https://download.dfinity.systems/ic/69e1408347723dbaa7a6cd2faa9b65c42abbe861/openssl-static-binaries/x86_64-linux/icx-proxy-dev.gz' sha256 = '2bff6952a65e2d94f49ffa5ce03bfbd0eef0fb6ca82a839844c84fd3efa8b280' diff --git a/src/dfx/assets/prepare_assets.rs b/src/dfx/assets/prepare_assets.rs index f2cdcdf2a9..ffc6f03d8b 100644 --- a/src/dfx/assets/prepare_assets.rs +++ b/src/dfx/assets/prepare_assets.rs @@ -113,7 +113,7 @@ fn write_binary_cache( Compression::new(6), )); for (path, bin) in bins.into_iter().chain( - ["ic-ref", "moc", "mo-doc", "mo-ide"] + ["moc", "mo-doc", "mo-ide"] .map(|bin| (bin.into(), bin_tars.remove(Path::new(bin)).unwrap())), ) { let mut header = Header::new_gnu(); @@ -220,13 +220,13 @@ async fn download_bin_tarballs( sources: Arc>, ) -> HashMap { let mut map = HashMap::new(); - let [motoko, ic_ref] = ["motoko", "ic-ref"].map(|pkg| { + let [motoko] = ["motoko"].map(|pkg| { let client = client.clone(); let source = sources[pkg].clone(); spawn(download_and_check_sha(client, source)) }); - let (motoko, ic_ref) = tokio::try_join!(motoko, ic_ref).unwrap(); - for tar in [motoko, ic_ref] { + let (motoko,) = tokio::try_join!(motoko,).unwrap(); + for tar in [motoko] { tar_xzf(&tar, |path, content| { map.insert(path, content); });