Skip to content

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Aug 20, 2025

We're calling this from inside a session, so the nested session inside
of Graph::resolve will panic.

Let's see if we can just remove the graph call here.
Comment on lines +115 to +123
let mut compiler = linter.init();
compiler.enter_mut(|compiler| -> Result<()> {
let mut pcx = compiler.parse();
configure_pcx(&mut pcx, &config, Some(&project), Some(&input))?;
pcx.parse();
let _ = compiler.lower_asts();
Ok(())
})?;
linter.lint(&input, &mut compiler);
Copy link
Contributor

Choose a reason for hiding this comment

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

nice 🤌

@DaniPopes DaniPopes marked this pull request as ready for review August 21, 2025 17:47
DaniPopes added a commit to paradigmxyz/solar that referenced this pull request Aug 22, 2025
Introduce `solar_sema::Compiler`. This is a unified API for the full
compiler pipeline, as well as encapsulating the `enter(|| _)`
requirement by only allowing access to the context when inside of the
closure.

See the HIR example and tests for the usage diff.
Migrations:
- foundry-compilers foundry-rs/compilers#300
- foundry: foundry-rs/foundry#11371

Closes #370.
onbjerg
onbjerg previously approved these changes Aug 22, 2025
@DaniPopes DaniPopes self-assigned this Aug 25, 2025
@DaniPopes DaniPopes merged commit 9138d41 into master Aug 26, 2025
22 checks passed
@DaniPopes DaniPopes deleted the dani/bump-compilers222 branch August 26, 2025 07:09
@github-project-automation github-project-automation bot moved this to Done in Foundry Aug 26, 2025
@grandizzy grandizzy moved this from Done to Completed in Foundry Sep 1, 2025
MerkleBoy pushed a commit to MerkleBoy/foundry that referenced this pull request Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

4 participants