Skip to content

Commit

Permalink
fix: collect_contract_names (#221)
Browse files Browse the repository at this point in the history
This should go over all nodes vs just the first one and its dependencies
  • Loading branch information
klkvr authored Nov 18, 2024
1 parent 84a83d3 commit 00e3158
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/compilers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ impl<T: ArtifactOutput, C: Compiler> Project<C, T> {
let graph = Graph::<C::ParsedSource>::resolve(&self.paths)?;
let mut contracts: HashMap<String, Vec<PathBuf>> = HashMap::new();
if !graph.is_empty() {
for node in graph.nodes(0) {
for node in &graph.nodes {
for contract_name in node.data.contract_names() {
contracts
.entry(contract_name.clone())
Expand Down
2 changes: 1 addition & 1 deletion crates/compilers/src/resolver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl<D> GraphEdges<D> {
#[derive(Debug)]
pub struct Graph<D = SolData> {
/// all nodes in the project, a `Node` represents a single file
nodes: Vec<Node<D>>,
pub nodes: Vec<Node<D>>,
/// relationship of the nodes
edges: GraphEdges<D>,
/// the root of the project this graph represents
Expand Down

0 comments on commit 00e3158

Please sign in to comment.