Browse Source

Bump lalrpop and other dependencies (#1329)

Signed-off-by: Sean Young <sean@mess.org>
Sean Young 2 years ago
parent
commit
92c5dd4bfa

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

@@ -9,7 +9,7 @@ jobs:
   linux-x86-64:
   linux-x86-64:
     name: Linux x86-64
     name: Linux x86-64
     runs-on: solang-ubuntu-latest
     runs-on: solang-ubuntu-latest
-    container: ghcr.io/hyperledger/solang-llvm:ci-2
+    container: ghcr.io/hyperledger/solang-llvm:ci-3
     steps:
     steps:
     - name: Checkout sources
     - name: Checkout sources
       uses: actions/checkout@v3.1.0
       uses: actions/checkout@v3.1.0
@@ -33,7 +33,7 @@ jobs:
     name: Linux arm64
     name: Linux arm64
     runs-on: linux-arm64
     runs-on: linux-arm64
     if: ${{ github.repository_owner == 'hyperledger' }}
     if: ${{ github.repository_owner == 'hyperledger' }}
-    container: ghcr.io/hyperledger/solang-llvm:ci-2
+    container: ghcr.io/hyperledger/solang-llvm:ci-3
     steps:
     steps:
     - name: Checkout sources
     - name: Checkout sources
       uses: actions/checkout@v3.1.0
       uses: actions/checkout@v3.1.0

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

@@ -19,7 +19,7 @@ jobs:
   lints:
   lints:
     name: Lints
     name: Lints
     runs-on: solang-ubuntu-latest
     runs-on: solang-ubuntu-latest
-    container: ghcr.io/hyperledger/solang-llvm:ci-2
+    container: ghcr.io/hyperledger/solang-llvm:ci-3
     steps:
     steps:
       - name: Checkout sources
       - name: Checkout sources
         uses: actions/checkout@v3
         uses: actions/checkout@v3
@@ -65,7 +65,7 @@ jobs:
   linux-x86-64:
   linux-x86-64:
     name: Linux x86-64
     name: Linux x86-64
     runs-on: solang-ubuntu-latest
     runs-on: solang-ubuntu-latest
-    container: ghcr.io/hyperledger/solang-llvm:ci-2
+    container: ghcr.io/hyperledger/solang-llvm:ci-3
     steps:
     steps:
     - name: Checkout sources
     - name: Checkout sources
       uses: actions/checkout@v3
       uses: actions/checkout@v3
@@ -86,7 +86,7 @@ jobs:
     name: Linux Arm
     name: Linux Arm
     runs-on: linux-arm64
     runs-on: linux-arm64
     if: ${{ github.repository_owner == 'hyperledger' }}
     if: ${{ github.repository_owner == 'hyperledger' }}
-    container: ghcr.io/hyperledger/solang-llvm:ci-2
+    container: ghcr.io/hyperledger/solang-llvm:ci-3
     steps:
     steps:
     - name: Checkout sources
     - name: Checkout sources
       uses: actions/checkout@v3
       uses: actions/checkout@v3
@@ -222,7 +222,7 @@ jobs:
   anchor:
   anchor:
     name: Anchor Integration test
     name: Anchor Integration test
     runs-on: solang-ubuntu-latest
     runs-on: solang-ubuntu-latest
-    container: ghcr.io/hyperledger/solang-llvm:ci-2
+    container: ghcr.io/hyperledger/solang-llvm:ci-3
     needs: linux-x86-64
     needs: linux-x86-64
     steps:
     steps:
     - name: Checkout sources
     - name: Checkout sources
@@ -269,7 +269,7 @@ jobs:
   solana:
   solana:
     name: Solana Integration test
     name: Solana Integration test
     runs-on: solang-ubuntu-latest
     runs-on: solang-ubuntu-latest
-    container: ghcr.io/hyperledger/solang-llvm:ci-2
+    container: ghcr.io/hyperledger/solang-llvm:ci-3
     needs: linux-x86-64
     needs: linux-x86-64
     steps:
     steps:
     - name: Checkout sources
     - name: Checkout sources

+ 2 - 2
Cargo.toml

@@ -58,8 +58,8 @@ ink_env = "=4.2.0"
 ink_metadata = "=4.2.0"
 ink_metadata = "=4.2.0"
 scale-info = "2.4"
 scale-info = "2.4"
 petgraph = "0.6.3"
 petgraph = "0.6.3"
-wasmparser = "0.104.0"
-wasm-encoder = "0.26"
+wasmparser = "0.106.0"
+wasm-encoder = "0.28"
 
 
 
 
 [dev-dependencies]
 [dev-dependencies]

+ 1 - 1
Dockerfile

@@ -1,4 +1,4 @@
-FROM ghcr.io/hyperledger/solang-llvm:ci-2 as builder
+FROM ghcr.io/hyperledger/solang-llvm:ci-3 as builder
 
 
 COPY . src
 COPY . src
 WORKDIR /src/stdlib/
 WORKDIR /src/stdlib/

+ 2 - 2
solang-parser/Cargo.toml

@@ -11,10 +11,10 @@ keywords = [ "solidity", "parser" ]
 edition = "2021"
 edition = "2021"
 
 
 [build-dependencies]
 [build-dependencies]
-lalrpop = { version = "0.19.12", default-features = false }
+lalrpop = { version = "0.20.0", default-features = false }
 
 
 [dependencies]
 [dependencies]
-lalrpop-util = "0.19.12"
+lalrpop-util = "0.20.0"
 phf = { version = "0.11", features = ["macros"] }
 phf = { version = "0.11", features = ["macros"] }
 unicode-xid = "0.2"
 unicode-xid = "0.2"
 itertools = "0.10"
 itertools = "0.10"

+ 2 - 5
solang-parser/src/lib.rs

@@ -21,13 +21,10 @@ mod tests;
 
 
 #[allow(
 #[allow(
     clippy::needless_lifetimes,
     clippy::needless_lifetimes,
-    clippy::clone_on_copy,
     clippy::type_complexity,
     clippy::type_complexity,
-    clippy::too_many_arguments,
     clippy::ptr_arg,
     clippy::ptr_arg,
     clippy::redundant_clone,
     clippy::redundant_clone,
-    clippy::just_underscores_and_digits,
-    clippy::or_fun_call
+    clippy::just_underscores_and_digits
 )]
 )]
 mod solidity {
 mod solidity {
     include!(concat!(env!("OUT_DIR"), "/solidity.rs"));
     include!(concat!(env!("OUT_DIR"), "/solidity.rs"));
@@ -94,7 +91,7 @@ fn parser_error_to_diagnostic(
             Loc::File(file_no, token.0, token.2),
             Loc::File(file_no, token.0, token.2),
             format!("extra token '{}' encountered", token.0),
             format!("extra token '{}' encountered", token.0),
         ),
         ),
-        ParseError::UnrecognizedEOF { expected, location } => Diagnostic::parser_error(
+        ParseError::UnrecognizedEof { expected, location } => Diagnostic::parser_error(
             Loc::File(file_no, *location, *location),
             Loc::File(file_no, *location, *location),
             format!("unexpected end of file, expecting {}", expected.join(", ")),
             format!("unexpected end of file, expecting {}", expected.join(", ")),
         ),
         ),

+ 6 - 6
solang-parser/src/tests.rs

@@ -47,13 +47,13 @@ contract 9c {
                 Diagnostic { loc: File(0, 48, 49), level: Error, ty: ParserError, message: r#"unrecognised token ';', expected string"#.to_string(), notes: vec![] },
                 Diagnostic { loc: File(0, 48, 49), level: Error, ty: ParserError, message: r#"unrecognised token ';', expected string"#.to_string(), notes: vec![] },
                 Diagnostic { loc: File(0, 62, 65), level: Error, ty: ParserError, message: r#"unrecognised token 'for', expected "(", ";", "=""#.to_string(), notes: vec![] },
                 Diagnostic { loc: File(0, 62, 65), level: Error, ty: ParserError, message: r#"unrecognised token 'for', expected "(", ";", "=""#.to_string(), notes: vec![] },
                 Diagnostic { loc: File(0, 78, 79), level: Error, ty: ParserError, message: r#"unrecognised token '9', expected "case", "default", "leave", "revert", "switch", identifier"#.to_string(), notes: vec![] },
                 Diagnostic { loc: File(0, 78, 79), level: Error, ty: ParserError, message: r#"unrecognised token '9', expected "case", "default", "leave", "revert", "switch", identifier"#.to_string(), notes: vec![] },
-                Diagnostic { loc: File(0, 95, 96), level: Error, ty: ParserError, message: "unrecognised token '0', expected \"!=\", \"%\", \"%=\", \"&\", \"&&\", \"&=\", \"(\", \")\", \"*\", \"**\", \"*=\", \"+\", \"++\", \"+=\", \",\", \"-\", \"--\", \"-=\", \".\", \"/\", \"/=\", \":\", \";\", \"<\", \"<<\", \"<<=\", \"<=\", \"=\", \"==\", \"=>\", \">\", \">=\", \">>\", \">>=\", \"?\", \"[\", \"]\", \"^\", \"^=\", \"calldata\", \"case\", \"constant\", \"default\", \"external\", \"immutable\", \"indexed\", \"internal\", \"leave\", \"memory\", \"override\", \"private\", \"public\", \"revert\", \"storage\", \"switch\", \"{\", \"|\", \"|=\", \"||\", \"}\", identifier".to_string(), notes: vec![] },
-                Diagnostic { loc: File(0, 116, 123), level: Error, ty: ParserError, message: "unrecognised token 'uint256', expected \"!=\", \"%\", \"%=\", \"&\", \"&&\", \"&=\", \")\", \"*\", \"**\", \"*=\", \"+\", \"++\", \"+=\", \",\", \"-\", \"--\", \"-=\", \".\", \"/\", \"/=\", \":\", \";\", \"<\", \"<<\", \"<<=\", \"<=\", \"=\", \"==\", \">\", \">=\", \">>\", \">>=\", \"?\", \"[\", \"]\", \"^\", \"^=\", \"case\", \"default\", \"leave\", \"switch\", \"|\", \"|=\", \"||\", \"}\", identifier".to_string(), notes: vec![] },
-                Diagnostic { loc: File(0, 403, 404), level: Error, ty: ParserError, message: "unrecognised token '3', expected \"!=\", \"%\", \"%=\", \"&\", \"&&\", \"&=\", \"(\", \")\", \"*\", \"**\", \"*=\", \"+\", \"++\", \"+=\", \",\", \"-\", \"--\", \"-=\", \".\", \"/\", \"/=\", \":\", \";\", \"<\", \"<<\", \"<<=\", \"<=\", \"=\", \"==\", \"=>\", \">\", \">=\", \">>\", \">>=\", \"?\", \"[\", \"]\", \"^\", \"^=\", \"calldata\", \"case\", \"constant\", \"default\", \"external\", \"immutable\", \"indexed\", \"internal\", \"leave\", \"memory\", \"override\", \"private\", \"public\", \"revert\", \"storage\", \"switch\", \"{\", \"|\", \"|=\", \"||\", \"}\", identifier".to_string(), notes: vec![] },
+                Diagnostic { loc: File(0, 95, 96), level: Error, ty: ParserError, message: "unrecognised token '0', expected \"(\", \"++\", \"--\", \".\", \"[\", \"case\", \"constant\", \"default\", \"external\", \"immutable\", \"internal\", \"leave\", \"override\", \"private\", \"public\", \"revert\", \"switch\", \"{\", identifier".to_string(), notes: vec![] },
+                Diagnostic { loc: File(0, 116, 123), level: Error, ty: ParserError, message: "unrecognised token 'uint256', expected \"++\", \"--\", \".\", \"[\", \"case\", \"default\", \"leave\", \"switch\", identifier".to_string(), notes: vec![] },
+                Diagnostic { loc: File(0, 403, 404), level: Error, ty: ParserError, message: "unrecognised token '3', expected \"(\", \"++\", \"--\", \".\", \"[\", \"case\", \"constant\", \"default\", \"external\", \"immutable\", \"internal\", \"leave\", \"override\", \"private\", \"public\", \"revert\", \"switch\", \"{\", identifier".to_string(), notes: vec![] },
                 Diagnostic { loc: File(0, 441, 442), level: Error, ty: ParserError, message: r#"unrecognised token '4', expected "(", "case", "default", "leave", "revert", "switch", identifier"#.to_string(), notes: vec![] },
                 Diagnostic { loc: File(0, 441, 442), level: Error, ty: ParserError, message: r#"unrecognised token '4', expected "(", "case", "default", "leave", "revert", "switch", identifier"#.to_string(), notes: vec![] },
-                Diagnostic { loc: File(0, 460, 461), level: Error, ty: ParserError, message: "unrecognised token '!', expected \"!=\", \"%\", \"%=\", \"&\", \"&&\", \"&=\", \")\", \"*\", \"**\", \"*=\", \"+\", \"++\", \"+=\", \",\", \"-\", \"--\", \"-=\", \".\", \"/\", \"/=\", \":\", \";\", \"<\", \"<<\", \"<<=\", \"<=\", \"=\", \"==\", \"=>\", \">\", \">=\", \">>\", \">>=\", \"?\", \"[\", \"]\", \"^\", \"^=\", \"calldata\", \"case\", \"constant\", \"default\", \"external\", \"immutable\", \"indexed\", \"internal\", \"leave\", \"memory\", \"override\", \"payable\", \"private\", \"public\", \"pure\", \"return\", \"returns\", \"revert\", \"storage\", \"switch\", \"view\", \"virtual\", \"{\", \"|\", \"|=\", \"||\", \"}\", identifier".to_string(), notes: vec![] },
-                Diagnostic { loc: File(0, 482, 483), level: Error, ty: ParserError, message: "unrecognised token '3', expected \"!=\", \"%\", \"%=\", \"&\", \"&&\", \"&=\", \"(\", \")\", \"*\", \"**\", \"*=\", \"+\", \"++\", \"+=\", \",\", \"-\", \"--\", \"-=\", \".\", \"/\", \"/=\", \":\", \";\", \"<\", \"<<\", \"<<=\", \"<=\", \"=\", \"==\", \"=>\", \">\", \">=\", \">>\", \">>=\", \"?\", \"[\", \"]\", \"^\", \"^=\", \"calldata\", \"case\", \"constant\", \"default\", \"external\", \"immutable\", \"indexed\", \"internal\", \"leave\", \"memory\", \"override\", \"private\", \"public\", \"revert\", \"storage\", \"switch\", \"{\", \"|\", \"|=\", \"||\", \"}\", identifier".to_string(), notes: vec![] },
-                Diagnostic { loc: File(0, 518, 522), level: Error, ty: ParserError, message: "unrecognised token 'uint256', expected \"!=\", \"%\", \"%=\", \"&\", \"&&\", \"&=\", \")\", \"*\", \"**\", \"*=\", \"+\", \"++\", \"+=\", \",\", \"-\", \"--\", \"-=\", \".\", \"/\", \"/=\", \":\", \";\", \"<\", \"<<\", \"<<=\", \"<=\", \"=\", \"==\", \">\", \">=\", \">>\", \">>=\", \"?\", \"[\", \"]\", \"^\", \"^=\", \"case\", \"default\", \"leave\", \"switch\", \"|\", \"|=\", \"||\", \"}\", identifier".to_string(), notes: vec![] },
+                Diagnostic { loc: File(0, 460, 461), level: Error, ty: ParserError, message: "unrecognised token '!', expected \";\", \"case\", \"constant\", \"default\", \"external\", \"immutable\", \"internal\", \"leave\", \"override\", \"payable\", \"private\", \"public\", \"pure\", \"return\", \"returns\", \"revert\", \"switch\", \"view\", \"virtual\", \"{\", identifier".to_string(), notes: vec![] },
+                Diagnostic { loc: File(0, 482, 483), level: Error, ty: ParserError, message: "unrecognised token '3', expected \"!=\", \"%\", \"%=\", \"&\", \"&&\", \"&=\", \"(\", \"*\", \"**\", \"*=\", \"+\", \"++\", \"+=\", \"-\", \"--\", \"-=\", \".\", \"/\", \"/=\", \";\", \"<\", \"<<\", \"<<=\", \"<=\", \"=\", \"==\", \">\", \">=\", \">>\", \">>=\", \"?\", \"[\", \"^\", \"^=\", \"calldata\", \"case\", \"default\", \"leave\", \"memory\", \"revert\", \"storage\", \"switch\", \"{\", \"|\", \"|=\", \"||\", identifier".to_string(), notes: vec![] },
+                Diagnostic { loc: File(0, 518, 522), level: Error, ty: ParserError, message: "unrecognised token 'uint256', expected \"!=\", \"%\", \"%=\", \"&\", \"&&\", \"&=\", \"*\", \"**\", \"*=\", \"+\", \"++\", \"+=\", \"-\", \"--\", \"-=\", \".\", \"/\", \"/=\", \";\", \"<\", \"<<\", \"<<=\", \"<=\", \"=\", \"==\", \">\", \">=\", \">>\", \">>=\", \"?\", \"[\", \"^\", \"^=\", \"case\", \"default\", \"leave\", \"switch\", \"|\", \"|=\", \"||\", identifier".to_string(), notes: vec![] },
                 Diagnostic { loc: File(0, 555, 556), level: Error, ty: ParserError, message: "unrecognised token '}', expected \"!\", \"(\", \"+\", \"++\", \"-\", \"--\", \"[\", \"address\", \"assembly\", \"bool\", \"break\", \"byte\", \"bytes\", \"case\", \"continue\", \"default\", \"delete\", \"do\", \"emit\", \"false\", \"for\", \"function\", \"if\", \"leave\", \"mapping\", \"new\", \"payable\", \"return\", \"revert\", \"string\", \"switch\", \"true\", \"try\", \"type\", \"unchecked\", \"while\", \"{\", \"~\", Bytes, Int, Uint, address, hexnumber, hexstring, identifier, number, rational, string".to_string(), notes: vec![] },
                 Diagnostic { loc: File(0, 555, 556), level: Error, ty: ParserError, message: "unrecognised token '}', expected \"!\", \"(\", \"+\", \"++\", \"-\", \"--\", \"[\", \"address\", \"assembly\", \"bool\", \"break\", \"byte\", \"bytes\", \"case\", \"continue\", \"default\", \"delete\", \"do\", \"emit\", \"false\", \"for\", \"function\", \"if\", \"leave\", \"mapping\", \"new\", \"payable\", \"return\", \"revert\", \"string\", \"switch\", \"true\", \"try\", \"type\", \"unchecked\", \"while\", \"{\", \"~\", Bytes, Int, Uint, address, hexnumber, hexstring, identifier, number, rational, string".to_string(), notes: vec![] },
                 Diagnostic { loc: File(0, 557, 558), level: Error, ty: ParserError, message: "unrecognised token '}', expected \"(\", \";\", \"@\", \"[\", \"abstract\", \"address\", \"bool\", \"byte\", \"bytes\", \"case\", \"contract\", \"default\", \"enum\", \"event\", \"false\", \"function\", \"import\", \"interface\", \"leave\", \"library\", \"mapping\", \"payable\", \"pragma\", \"string\", \"struct\", \"switch\", \"true\", \"type\", \"using\", Bytes, Int, Uint, address, hexnumber, hexstring, identifier, number, rational, string".to_string(), notes: vec![] }
                 Diagnostic { loc: File(0, 557, 558), level: Error, ty: ParserError, message: "unrecognised token '}', expected \"(\", \";\", \"@\", \"[\", \"abstract\", \"address\", \"bool\", \"byte\", \"bytes\", \"case\", \"contract\", \"default\", \"enum\", \"event\", \"false\", \"function\", \"import\", \"interface\", \"leave\", \"library\", \"mapping\", \"payable\", \"pragma\", \"string\", \"struct\", \"switch\", \"true\", \"type\", \"using\", Bytes, Int, Uint, address, hexnumber, hexstring, identifier, number, rational, string".to_string(), notes: vec![] }
             ]
             ]

+ 1 - 1
src/sema/yul/tests/expression.rs

@@ -1059,7 +1059,7 @@ contract testTypes {
 
 
     let ns = parse(file);
     let ns = parse(file);
     assert!(ns.diagnostics.contains_message(
     assert!(ns.diagnostics.contains_message(
-        r#"unrecognised token ':=', expected ")", ",", "abstract", "address", "anonymous", "as", "assembly", "bool", "break", "byte", "bytes", "calldata", "case", "catch", "constant", "constructor", "continue", "contract", "default", "do", "else", "emit", "enum", "event", "external", "fallback", "for", "function", "if", "immutable", "import", "indexed", "interface", "internal", "is", "leave", "let", "library", "mapping", "memory", "modifier", "new", "override", "payable", "pragma", "private", "public", "pure", "receive", "return", "returns", "revert", "storage", "string", "struct", "switch", "throw", "try", "unchecked", "using", "view", "virtual", "while", "{", "}", Int, Uint, identifier"#
+        r#"unrecognised token ':=', expected "abstract", "address", "anonymous", "as", "assembly", "bool", "break", "byte", "bytes", "calldata", "catch", "constant", "constructor", "continue", "contract", "do", "else", "emit", "enum", "event", "external", "fallback", "for", "function", "if", "immutable", "import", "indexed", "interface", "internal", "is", "leave", "let", "library", "mapping", "memory", "modifier", "new", "override", "payable", "pragma", "private", "public", "pure", "receive", "return", "returns", "revert", "storage", "string", "struct", "switch", "throw", "try", "unchecked", "using", "view", "virtual", "while", "{", "}", Int, Uint, identifier"#
     ));
     ));
 
 
     let file = r#"
     let file = r#"

+ 1 - 1
tests/contract_testcases/substrate/events/emit.sol

@@ -5,4 +5,4 @@
             }
             }
         }
         }
 // ---- Expect: diagnostics ----
 // ---- Expect: diagnostics ----
-// error: 4:24-25: unrecognised token '(', expected "!=", "%", "%=", "&", "&&", "&=", ")", "*", "**", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", ";", "<", "<<", "<<=", "<=", "=", "==", ">", ">=", ">>", ">>=", "?", "[", "]", "^", "^=", "case", "default", "leave", "switch", "|", "|=", "||", "}", identifier
+// error: 4:24-25: unrecognised token '(', expected "++", "--", ".", "[", "case", "default", "leave", "switch", identifier

+ 1 - 1
tests/contract_testcases/substrate/primitives/units_02.sol

@@ -5,4 +5,4 @@
             }
             }
         }
         }
 // ---- Expect: diagnostics ----
 // ---- Expect: diagnostics ----
-// error: 4:35-39: unrecognised token 'days', expected "!=", "%", "%=", "&", "&&", "&=", ")", "*", "**", "*=", "+", "++", "+=", ",", "-", "--", "-=", ".", "/", "/=", ":", ";", "<", "<<", "<<=", "<=", "=", "==", ">", ">=", ">>", ">>=", "?", "[", "]", "^", "^=", "|", "|=", "||", "}"
+// error: 4:35-39: unrecognised token 'days', expected "!=", "%", "%=", "&", "&&", "&=", "*", "**", "*=", "+", "++", "+=", "-", "--", "-=", ".", "/", "/=", ";", "<", "<<", "<<=", "<=", "=", "==", ">", ">=", ">>", ">>=", "?", "[", "^", "^=", "|", "|=", "||"