Skip to content

Commit 6567506

Browse files
committed
trigger LLVM IR and EraVM assembly project errors
1 parent 80557b4 commit 6567506

File tree

77 files changed

+1703
-902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1703
-902
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
*.bak
2323

2424
# Test solc versions
25-
solc-bin/
25+
**/solc-bin/
26+
**/solc-bin-upstream/

Cargo.lock

Lines changed: 41 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

era-compiler-solidity/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ doctest = false
1818
structopt = { version = "=0.3.26", default-features = false }
1919
thiserror = "=1.0.64"
2020
anyhow = "=1.0.89"
21+
boolinator = "=2.4.0"
2122
which = "=6.0.3"
2223
path-slash = "=0.2.1"
2324
normpath = "=1.3.0"

era-compiler-solidity/src/build_eravm/mod.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,23 +113,23 @@ impl Build {
113113
standard_json: &mut StandardJsonOutput,
114114
solc_version: Option<&SolcVersion>,
115115
) -> anyhow::Result<()> {
116-
let standard_json_contracts = standard_json.contracts.get_or_insert_with(BTreeMap::new);
117116
let mut errors = Vec::with_capacity(self.contracts.len());
118117
for (full_path, build) in self.contracts.into_iter() {
119118
let mut full_path_split = full_path.split(':');
120119
let path = full_path_split.next().expect("Always exists");
121120
let name = full_path_split.next().unwrap_or(path);
122121

123122
match build {
124-
Ok(build) => match standard_json_contracts
123+
Ok(build) => match standard_json
124+
.contracts
125125
.get_mut(path)
126126
.and_then(|contracts| contracts.get_mut(name))
127127
{
128128
Some(contract) => {
129129
build.write_to_standard_json(contract)?;
130130
}
131131
None => {
132-
let contracts = standard_json_contracts.entry(path.to_owned()).or_default();
132+
let contracts = standard_json.contracts.entry(path.to_owned()).or_default();
133133
let mut contract = StandardJsonOutputContract::default();
134134
build.write_to_standard_json(&mut contract)?;
135135
contracts.insert(name.to_owned(), contract);
@@ -139,10 +139,7 @@ impl Build {
139139
}
140140
}
141141

142-
standard_json
143-
.errors
144-
.get_or_insert_with(Vec::new)
145-
.extend(errors);
142+
standard_json.errors.extend(errors);
146143
if let Some(solc_version) = solc_version {
147144
standard_json.version = Some(solc_version.default.to_string());
148145
standard_json.long_version = Some(solc_version.long.to_owned());

era-compiler-solidity/src/build_evm/mod.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,23 @@ impl Build {
116116
standard_json: &mut StandardJsonOutput,
117117
solc_version: Option<&SolcVersion>,
118118
) -> anyhow::Result<()> {
119-
let standard_json_contracts = standard_json.contracts.get_or_insert_with(BTreeMap::new);
120119
let mut errors = Vec::with_capacity(self.contracts.len());
121120
for (full_path, build) in self.contracts.into_iter() {
122121
let mut full_path_split = full_path.split(':');
123122
let path = full_path_split.next().expect("Always exists");
124123
let name = full_path_split.next().unwrap_or(path);
125124

126125
match build {
127-
Ok(build) => match standard_json_contracts
126+
Ok(build) => match standard_json
127+
.contracts
128128
.get_mut(path)
129129
.and_then(|contracts| contracts.get_mut(name))
130130
{
131131
Some(contract) => {
132132
build.write_to_standard_json(contract)?;
133133
}
134134
None => {
135-
let contracts = standard_json_contracts.entry(path.to_owned()).or_default();
135+
let contracts = standard_json.contracts.entry(path.to_owned()).or_default();
136136
let mut contract = StandardJsonOutputContract::default();
137137
build.write_to_standard_json(&mut contract)?;
138138
contracts.insert(name.to_owned(), contract);
@@ -142,10 +142,7 @@ impl Build {
142142
}
143143
}
144144

145-
standard_json
146-
.errors
147-
.get_or_insert_with(Vec::new)
148-
.extend(errors);
145+
standard_json.errors.extend(errors);
149146
if let Some(solc_version) = solc_version {
150147
standard_json.version = Some(solc_version.default.to_string());
151148
standard_json.long_version = Some(solc_version.long.to_owned());

0 commit comments

Comments
 (0)