Skip to content

Commit 15a9f17

Browse files
authored
chore(deps): bump solar 0.1.1 (#9627)
1 parent a5c5be5 commit 15a9f17

File tree

9 files changed

+61
-54
lines changed

9 files changed

+61
-54
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,10 @@ foundry-linking = { path = "crates/linking" }
171171

172172
# solc & compilation utilities
173173
foundry-block-explorers = { version = "0.9.0", default-features = false }
174-
foundry-compilers = { version = "0.12.8", default-features = false }
174+
foundry-compilers = { version = "0.12.9", default-features = false }
175175
foundry-fork-db = "0.10.0"
176176
solang-parser = "=0.3.3"
177-
solar-ast = { version = "=0.1.0", default-features = false }
178-
solar-parse = { version = "=0.1.0", default-features = false }
177+
solar-parse = { version = "=0.1.1", default-features = false }
179178

180179
## revm
181180
revm = { version = "19.0.0", default-features = false }

crates/chisel/src/solidity_helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use rustyline::{
1515
Helper,
1616
};
1717
use solar_parse::{
18-
interface::{Pos, Session, SessionGlobals},
18+
interface::{Session, SessionGlobals},
1919
token::{Token, TokenKind},
2020
Lexer,
2121
};

crates/config/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ alloy-primitives = { workspace = true, features = ["serde"] }
2222
revm-primitives.workspace = true
2323

2424
solar-parse.workspace = true
25-
solar-ast.workspace = true
2625

2726
dirs-next = "2"
2827
dunce.workspace = true

crates/config/src/inline/natspec.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ use foundry_compilers::{
66
};
77
use itertools::Itertools;
88
use serde_json::Value;
9-
use solar_ast::{
10-
ast::{Arena, CommentKind, Item, ItemKind},
11-
interface::{self, Session},
9+
use solar_parse::{
10+
ast::{
11+
interface::{self, Session},
12+
Arena, CommentKind, Item, ItemKind,
13+
},
14+
Parser,
1215
};
13-
use solar_parse::Parser;
1416
use std::{collections::BTreeMap, path::Path};
1517

1618
/// Convenient struct to hold in-line per-test configurations

crates/evm/traces/src/debug/sources.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ use foundry_compilers::{
1111
use foundry_evm_core::utils::PcIcMap;
1212
use foundry_linking::Linker;
1313
use rayon::prelude::*;
14-
use solar_parse::{
15-
interface::{Pos, Session},
16-
Parser,
17-
};
14+
use solar_parse::{interface::Session, Parser};
1815
use std::{
1916
collections::{BTreeMap, HashMap},
2017
ops::Range,

crates/forge/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ semver.workspace = true
8989
serde_json.workspace = true
9090
similar = { version = "2", features = ["inline"] }
9191
solang-parser.workspace = true
92-
solar-ast.workspace = true
9392
solar-parse.workspace = true
9493
strum = { workspace = true, features = ["derive"] }
9594
thiserror.workspace = true

crates/forge/bin/cmd/bind_json.rs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ use foundry_compilers::{
1515
};
1616
use foundry_config::Config;
1717
use itertools::Itertools;
18-
use solar_ast::{
19-
ast::{self, Arena, FunctionKind, Span, VarMut},
20-
interface::source_map::FileName,
21-
visit::Visit,
18+
use rayon::prelude::*;
19+
use solar_parse::{
20+
ast::{self, interface::source_map::FileName, visit::Visit, Arena, FunctionKind, Span, VarMut},
21+
interface::Session,
22+
Parser as SolarParser,
2223
};
23-
use solar_parse::{interface::Session, Parser as SolarParser};
2424
use std::{
2525
collections::{BTreeMap, BTreeSet},
2626
fmt::{self, Write},
27+
ops::ControlFlow,
2728
path::PathBuf,
2829
sync::Arc,
2930
};
@@ -89,9 +90,8 @@ impl BindJsonArgs {
8990
.1;
9091

9192
let sess = Session::builder().with_stderr_emitter().build();
92-
let result = sess.enter(|| -> solar_parse::interface::Result<()> {
93-
// TODO: Switch back to par_iter_mut and `enter_parallel` after solar update.
94-
sources.0.iter_mut().try_for_each(|(path, source)| {
93+
let result = sess.enter_parallel(|| -> solar_parse::interface::Result<()> {
94+
sources.0.par_iter_mut().try_for_each(|(path, source)| {
9595
let mut content = Arc::try_unwrap(std::mem::take(&mut source.content)).unwrap();
9696

9797
let arena = Arena::new();
@@ -153,7 +153,12 @@ impl PreprocessorVisitor {
153153
}
154154

155155
impl<'ast> Visit<'ast> for PreprocessorVisitor {
156-
fn visit_item_function(&mut self, func: &'ast ast::ItemFunction<'ast>) {
156+
type BreakValue = solar_parse::interface::data_structures::Never;
157+
158+
fn visit_item_function(
159+
&mut self,
160+
func: &'ast ast::ItemFunction<'ast>,
161+
) -> ControlFlow<Self::BreakValue> {
157162
// Replace function bodies with a noop statement.
158163
if let Some(block) = &func.body {
159164
if !block.is_empty() {
@@ -169,7 +174,10 @@ impl<'ast> Visit<'ast> for PreprocessorVisitor {
169174
self.walk_item_function(func)
170175
}
171176

172-
fn visit_variable_definition(&mut self, var: &'ast ast::VariableDefinition<'ast>) {
177+
fn visit_variable_definition(
178+
&mut self,
179+
var: &'ast ast::VariableDefinition<'ast>,
180+
) -> ControlFlow<Self::BreakValue> {
173181
// Remove `immutable` attributes.
174182
if let Some(VarMut::Immutable) = var.mutability {
175183
self.updates.push((var.span, ""));

crates/forge/bin/cmd/geiger.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ use foundry_cli::utils::LoadConfig;
44
use foundry_compilers::{resolver::parse::SolData, Graph};
55
use foundry_config::{impl_figment_convert_basic, Config};
66
use itertools::Itertools;
7-
use solar_ast::visit::Visit;
8-
use solar_parse::{ast, interface::Session};
9-
use std::path::{Path, PathBuf};
7+
use solar_parse::{ast, ast::visit::Visit, interface::Session};
8+
use std::{
9+
ops::ControlFlow,
10+
path::{Path, PathBuf},
11+
};
1012

1113
/// CLI arguments for `forge geiger`.
1214
#[derive(Clone, Debug, Parser)]
@@ -144,7 +146,9 @@ impl<'a> Visitor<'a> {
144146
}
145147

146148
impl<'ast> Visit<'ast> for Visitor<'_> {
147-
fn visit_expr(&mut self, expr: &'ast ast::Expr<'ast>) {
149+
type BreakValue = solar_parse::interface::data_structures::Never;
150+
151+
fn visit_expr(&mut self, expr: &'ast ast::Expr<'ast>) -> ControlFlow<Self::BreakValue> {
148152
if let ast::ExprKind::Call(lhs, _args) = &expr.kind {
149153
if let ast::ExprKind::Member(_lhs, member) = &lhs.kind {
150154
if self.unsafe_cheatcodes.iter().any(|c| c.as_str() == member.as_str()) {
@@ -154,6 +158,6 @@ impl<'ast> Visit<'ast> for Visitor<'_> {
154158
}
155159
}
156160
}
157-
self.walk_expr(expr);
161+
self.walk_expr(expr)
158162
}
159163
}

0 commit comments

Comments
 (0)