File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
crates/cairo-lang-compiler/src Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,17 @@ impl ExternalCodeSizeEstimator for RootDatabase {
4646 // probably too large for inline so we can just return the max size.
4747 return Ok ( isize:: MAX ) ;
4848 }
49+ if std:: env:: var ( "CAIRO_DEBUG_SIERRA_GEN" ) . is_ok ( ) {
50+ // If we are debugging sierra generation, we want to finish the compilation
51+ // rather than panic.
52+ return Ok ( isize:: MAX ) ;
53+ }
4954
50- panic ! ( "Failed to compile program to casm." ) ;
55+ panic ! (
56+ "Internal compiler error: Failed to compile program to casm. You can set the \
57+ CAIRO_DEBUG_SIERRA_GEN environment if you want to finish the compilation and \
58+ debug the sierra program."
59+ ) ;
5160 }
5261 } ;
5362 let casm = builder. casm_program ( ) ;
You can’t perform that action at this time.
0 commit comments