浏览代码

Require rust 1.70.0 (#1506)

clap, one of our dependencies, requires 1.70.0 now.

Signed-off-by: Sean Young <sean@mess.org>
Sean Young 2 年之前
父节点
当前提交
7774674eec
共有 6 个文件被更改,包括 26 次插入26 次删除
  1. 5 5
      .github/workflows/release.yml
  2. 5 5
      .github/workflows/test.yml
  3. 1 1
      Cargo.toml
  4. 1 1
      Dockerfile
  5. 1 1
      docs/installing.rst
  6. 13 13
      tests/polkadot_tests/calls.rs

+ 5 - 5
.github/workflows/release.yml

@@ -16,7 +16,7 @@ jobs:
       with:
       with:
         submodules: recursive
         submodules: recursive
     - name: Rust stable
     - name: Rust stable
-      run: rustup default 1.68.0
+      run: rustup default 1.70.0
     - name: Build
     - name: Build
       run: cargo build --verbose --release
       run: cargo build --verbose --release
     - name: Run tests
     - name: Run tests
@@ -40,7 +40,7 @@ jobs:
       with:
       with:
         submodules: recursive
         submodules: recursive
     - name: Rust stable
     - name: Rust stable
-      run: rustup default 1.68.0
+      run: rustup default 1.70.0
     - name: Build
     - name: Build
       run: cargo build --verbose --release
       run: cargo build --verbose --release
     - name: Run tests
     - name: Run tests
@@ -67,7 +67,7 @@ jobs:
       run: unzip c:\llvm.zip -d c:/
       run: unzip c:\llvm.zip -d c:/
     - name: Add LLVM to Path
     - name: Add LLVM to Path
       run: echo "c:\llvm15.0\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
       run: echo "c:\llvm15.0\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
-    - uses: dtolnay/rust-toolchain@1.68.0
+    - uses: dtolnay/rust-toolchain@1.70.0
       with:
       with:
         components: clippy
         components: clippy
     - name: Build
     - name: Build
@@ -91,7 +91,7 @@ jobs:
       uses: actions/checkout@v3
       uses: actions/checkout@v3
       with:
       with:
         submodules: recursive
         submodules: recursive
-    - uses: dtolnay/rust-toolchain@1.68.0
+    - uses: dtolnay/rust-toolchain@1.70.0
     - name: Get LLVM
     - name: Get LLVM
       run: curl -sSL --output llvm15.0-mac-arm.tar.xz https://github.com/hyperledger/solang-llvm/releases/download/llvm15-1/llvm15.0-mac-arm.tar.xz
       run: curl -sSL --output llvm15.0-mac-arm.tar.xz https://github.com/hyperledger/solang-llvm/releases/download/llvm15-1/llvm15.0-mac-arm.tar.xz
     - name: Extract LLVM
     - name: Extract LLVM
@@ -121,7 +121,7 @@ jobs:
       uses: actions/checkout@v3
       uses: actions/checkout@v3
       with:
       with:
         submodules: recursive
         submodules: recursive
-    - uses: dtolnay/rust-toolchain@1.68.0
+    - uses: dtolnay/rust-toolchain@1.70.0
     - name: Get LLVM
     - name: Get LLVM
       run: wget -q -O llvm15.0-mac-intel.tar.xz https://github.com/hyperledger/solang-llvm/releases/download/llvm15-1/llvm15.0-mac-intel.tar.xz
       run: wget -q -O llvm15.0-mac-intel.tar.xz https://github.com/hyperledger/solang-llvm/releases/download/llvm15-1/llvm15.0-mac-intel.tar.xz
     - name: Extract LLVM
     - name: Extract LLVM

+ 5 - 5
.github/workflows/test.yml

@@ -78,7 +78,7 @@ jobs:
       with:
       with:
         submodules: recursive
         submodules: recursive
     - name: Rust stable
     - name: Rust stable
-      run: rustup default 1.68.0
+      run: rustup default 1.70.0
     - name: Build
     - name: Build
       run: cargo build --verbose
       run: cargo build --verbose
     - name: Run tests
     - name: Run tests
@@ -100,7 +100,7 @@ jobs:
       with:
       with:
         submodules: recursive
         submodules: recursive
     - name: Rust stable
     - name: Rust stable
-      run: rustup default 1.68.0
+      run: rustup default 1.70.0
     - name: Build
     - name: Build
       run: cargo build --verbose
       run: cargo build --verbose
     - name: Run tests
     - name: Run tests
@@ -124,7 +124,7 @@ jobs:
       run: unzip c:\llvm.zip -d c:/
       run: unzip c:\llvm.zip -d c:/
     - name: Add LLVM to Path
     - name: Add LLVM to Path
       run: echo "c:\llvm15.0\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
       run: echo "c:\llvm15.0\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
-    - uses: dtolnay/rust-toolchain@1.68.0
+    - uses: dtolnay/rust-toolchain@1.70.0
       with:
       with:
         components: clippy
         components: clippy
     # We run clippy on Linux in the lint job above, but this does not check #[cfg(windows)] items
     # We run clippy on Linux in the lint job above, but this does not check #[cfg(windows)] items
@@ -148,7 +148,7 @@ jobs:
       uses: actions/checkout@v3
       uses: actions/checkout@v3
       with:
       with:
         submodules: recursive
         submodules: recursive
-    - uses: dtolnay/rust-toolchain@1.68.0
+    - uses: dtolnay/rust-toolchain@1.70.0
     - name: Get LLVM
     - name: Get LLVM
       run: curl -sSL --output llvm15.0-mac-arm.tar.xz https://github.com/hyperledger/solang-llvm/releases/download/llvm15-1/llvm15.0-mac-arm.tar.xz
       run: curl -sSL --output llvm15.0-mac-arm.tar.xz https://github.com/hyperledger/solang-llvm/releases/download/llvm15-1/llvm15.0-mac-arm.tar.xz
     - name: Extract LLVM
     - name: Extract LLVM
@@ -174,7 +174,7 @@ jobs:
       uses: actions/checkout@v3
       uses: actions/checkout@v3
       with:
       with:
         submodules: recursive
         submodules: recursive
-    - uses: dtolnay/rust-toolchain@1.68.0
+    - uses: dtolnay/rust-toolchain@1.70.0
     - name: Get LLVM
     - name: Get LLVM
       run: wget -q -O llvm15.0-mac-intel.tar.xz https://github.com/hyperledger/solang-llvm/releases/download/llvm15-1/llvm15.0-mac-intel.tar.xz
       run: wget -q -O llvm15.0-mac-intel.tar.xz https://github.com/hyperledger/solang-llvm/releases/download/llvm15-1/llvm15.0-mac-intel.tar.xz
     - name: Extract LLVM
     - name: Extract LLVM

+ 1 - 1
Cargo.toml

@@ -8,7 +8,7 @@ license = "Apache-2.0"
 build = "build.rs"
 build = "build.rs"
 description = "Solang Solidity Compiler"
 description = "Solang Solidity Compiler"
 keywords = [ "solidity", "compiler", "solana", "polkadot", "substrate" ]
 keywords = [ "solidity", "compiler", "solana", "polkadot", "substrate" ]
-rust-version = "1.68.0"
+rust-version = "1.70.0"
 edition = "2021"
 edition = "2021"
 exclude = [ "/.*", "/docs",  "/examples", "/solana-library", "/tests", "/integration", "/vscode", "/testdata" ]
 exclude = [ "/.*", "/docs",  "/examples", "/solana-library", "/tests", "/integration", "/vscode", "/testdata" ]
 
 

+ 1 - 1
Dockerfile

@@ -4,7 +4,7 @@ COPY . src
 WORKDIR /src/stdlib/
 WORKDIR /src/stdlib/
 RUN make
 RUN make
 
 
-RUN rustup default 1.68.0
+RUN rustup default 1.70.0
 
 
 WORKDIR /src
 WORKDIR /src
 RUN cargo build --release
 RUN cargo build --release

+ 1 - 1
docs/installing.rst

@@ -89,7 +89,7 @@ Option 5: Build Solang from source
 
 
 In order to build Solang from source, you will need:
 In order to build Solang from source, you will need:
 
 
-* Rust version 1.68.0 or higher
+* Rust version 1.70.0 or higher
 * A C++ compiler with support for C++17
 * A C++ compiler with support for C++17
 * A build of LLVM based on the Solana LLVM tree. There are a few LLVM patches required that are not upstream yet.
 * A build of LLVM based on the Solana LLVM tree. There are a few LLVM patches required that are not upstream yet.
 
 

+ 13 - 13
tests/polkadot_tests/calls.rs

@@ -1032,26 +1032,26 @@ fn constructors_and_messages_distinct_in_dispatcher() {
 #[test]
 #[test]
 fn error_bubbling() {
 fn error_bubbling() {
     let mut runtime = build_solidity(
     let mut runtime = build_solidity(
-        r##"contract C {
+        r#"contract C {
         function raw_call() public payable returns (bytes ret) {
         function raw_call() public payable returns (bytes ret) {
             B b = new B();
             B b = new B();
             (bool ok, ret) = address(b).call{value: 5000}(bytes4(0x00000000));
             (bool ok, ret) = address(b).call{value: 5000}(bytes4(0x00000000));
         }
         }
-    
+
         function normal_call() public payable {
         function normal_call() public payable {
             B b = new B();
             B b = new B();
             b.b();
             b.b();
         }
         }
-    
+
         function ext_func_call() public payable {
         function ext_func_call() public payable {
             A a = new A();
             A a = new A();
             function() external payable func = a.a;
             function() external payable func = a.a;
             func{value: 1000}();
             func{value: 1000}();
             a.a();
             a.a();
         }
         }
-    
+
     }
     }
-    
+
     contract B {
     contract B {
         @selector([0, 0, 0, 0])
         @selector([0, 0, 0, 0])
         function b() public payable {
         function b() public payable {
@@ -1059,13 +1059,13 @@ fn error_bubbling() {
             a.a();
             a.a();
         }
         }
     }
     }
-    
+
     contract A {
     contract A {
         function a() public payable {
         function a() public payable {
             revert("no");
             revert("no");
         }
         }
     }
     }
-    "##,
+    "#,
     );
     );
 
 
     runtime.set_transferred_value(20000);
     runtime.set_transferred_value(20000);
@@ -1087,27 +1087,27 @@ fn error_bubbling() {
 #[test]
 #[test]
 fn constructor_reverts_bubbling() {
 fn constructor_reverts_bubbling() {
     let mut runtime = build_solidity(
     let mut runtime = build_solidity(
-        r##"
+        r#"
         contract A {
         contract A {
             B public b;
             B public b;
             constructor(bool r) payable {
             constructor(bool r) payable {
                 b = new B(r);
                 b = new B(r);
             }
             }
         }
         }
-    
+
         contract B {
         contract B {
             C public c;
             C public c;
             constructor(bool r) payable {
             constructor(bool r) payable {
                 c = new C(r);
                 c = new C(r);
             }
             }
         }
         }
-    
+
         contract C {
         contract C {
             uint public foo;
             uint public foo;
             constructor(bool r) {
             constructor(bool r) {
                 if (!r) revert("no");
                 if (!r) revert("no");
             }
             }
-        }"##,
+        }"#,
     );
     );
 
 
     runtime.set_transferred_value(20000);
     runtime.set_transferred_value(20000);
@@ -1130,14 +1130,14 @@ fn try_catch_uncaught_bubbles_up() {
             b.b{value: 1000}();
             b.b{value: 1000}();
         }
         }
     }
     }
-    
+
     contract B {
     contract B {
         function b() public payable {
         function b() public payable {
             A a = new A();
             A a = new A();
             try a.a(0) {} catch Error(string) {}
             try a.a(0) {} catch Error(string) {}
         }
         }
     }
     }
-    
+
     contract A {
     contract A {
         function a(uint div) public pure returns(uint) {
         function a(uint div) public pure returns(uint) {
             return 123 / div;
             return 123 / div;