Skip to content

Commit 1f552c7

Browse files
fix: collect_contract_names (#221)
This should go over all nodes vs just the first one and its dependencies
1 parent 7e9e114 commit 1f552c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/compilers/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ impl<T: ArtifactOutput, C: Compiler> Project<C, T> {
382382
let graph = Graph::<C::ParsedSource>::resolve(&self.paths)?;
383383
let mut contracts: HashMap<String, Vec<PathBuf>> = HashMap::new();
384384
if !graph.is_empty() {
385-
for node in graph.nodes(0) {
385+
for node in &graph.nodes {
386386
for contract_name in node.data.contract_names() {
387387
contracts
388388
.entry(contract_name.clone())

crates/compilers/src/resolver/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ impl<D> GraphEdges<D> {
205205
#[derive(Debug)]
206206
pub struct Graph<D = SolData> {
207207
/// all nodes in the project, a `Node` represents a single file
208-
nodes: Vec<Node<D>>,
208+
pub nodes: Vec<Node<D>>,
209209
/// relationship of the nodes
210210
edges: GraphEdges<D>,
211211
/// the root of the project this graph represents

0 commit comments

Comments
 (0)