-
Couldn't load subscription status.
- Fork 2.2k
Open
Labels
Milestone
Description
Component
Forge
Describe the feature you would like
#11547 introduces backtraces to forge in case of a failure but it does not display BacktraceFrame's for modifiers, internal calls / libraries (these get inlined in the bytecode) as this requires TraceMode::Debug and solc ast analysis which was causing OOM issues, See: #11648
We can detect internal calls using solar. Ref: #11612
foundry/crates/forge/src/cmd/test/mod.rs
Lines 310 to 327 in 9d4f7eb
| // Initialize and configure the solar compiler. | |
| let mut analysis = solar::sema::Compiler::new( | |
| solar::interface::Session::builder().with_stderr_emitter().build(), | |
| ); | |
| let dcx = analysis.dcx_mut(); | |
| dcx.set_emitter(Box::new( | |
| solar::interface::diagnostics::HumanEmitter::stderr(Default::default()) | |
| .source_map(Some(dcx.source_map().unwrap().clone())), | |
| )); | |
| dcx.set_flags_mut(|f| f.track_diagnostics = false); | |
| // Populate solar's global context by parsing and lowering the sources. | |
| analysis.enter_mut(|compiler| -> Result<()> { | |
| let mut pcx = compiler.parse(); | |
| configure_pcx(&mut pcx, &config, Some(&project), Some(&analysis_files))?; | |
| pcx.parse(); | |
| let _ = compiler.lower_asts(); | |
| Ok(()) | |
| })?; |
Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Blocked