Sitelet https://github.com/foundry-rs/compilers/pull/142
Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

refactor: extract artifacts to a separate crate - #142

Merged
DaniPopes merged 22 commits into
mainfrom
klkvr/extract-artifacts
Jun 14, 2024
Merged

DaniPopes merged 22 commits into
mainfrom
klkvr/extract-artifacts

Conversation

@klkvr

@klkvr klkvr commented Jun 13, 2024

Copy link
Copy Markdown
Member

Closes #129

Divides foundry-compilers into 3 crates:

  • foundry-compilers-artifacts - JSON artifacts for Solc and Vyper compilers
  • foundry-compilers-project - Project related logic, including compiler abstraction and compilation pipeline
  • foundry-compilers-core - error types and utilties shared by both crates

@klkvr
klkvr requested review from DaniPopes and Evalir as code owners June 13, 2024 00:12
@klkvr klkvr changed the title extract artifacts to a separate crate refactor: extract artifacts to a separate crate Jun 13, 2024
Comment thread crates/artifacts/src/vyper/mod.rs
Comment thread crates/artifacts/LICENSE-APACHE Outdated

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

splitting into
artifacts
core
compilers

makes sense

I suggest to do a foundry companion first before we merge this so that we can fix things like missing re-exports etc.

Comment thread crates/project/src/lib.rs Outdated
Comment on lines +53 to +57
use foundry_compilers_artifacts::{
output_selection::OutputSelection,
sources::{Source, Sources},
Contract, Settings, Severity, SourceFile, StandardJsonCompilerInput,
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we likely want to re-export

foundry_compilers_artifacts as artifacts

so that you don't need to depend on all crates if you're already pulling in compilers

@DaniPopes DaniPopes left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last thing, artifacts should be a subdirectory like

  • artifacts
    • solc/src -- base solc
    • vyper/src -- base vyper + imports solc
    • artifacts/src -- meta crate that re-exports both solc and vyper (might not be necessary cc @mattsse )

@mattsse mattsse left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this

image

@DaniPopes
DaniPopes merged commit c99fe3b into main Jun 14, 2024
@DaniPopes
DaniPopes deleted the klkvr/extract-artifacts branch June 14, 2024 16:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract JSON artifacts to separate crates

3 participants