morpho-org / pre-liquidation

Other
3 stars 1 forks source link

Compilation with classic pipeline does not work (stack too deep) #73

Closed adhusson closed 1 month ago

adhusson commented 1 month ago

I get

Compiler run failed:
Error: Compiler error (/solidity/libsolidity/codegen/LValue.cpp:55):Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables.
CompilerError: Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables.
   --> src/PreLiquidation.sol:152:42:
    |
152 |             uint256 seizedAssetsQuoted = seizedAssets.mulDivUp(collateralPrice, ORACLE_PRICE_SCALE);
colin-morpho commented 1 month ago

If I understand correctly, we only want to support compilation through IR. I'll let the others comment on this.

MathisGD commented 1 month ago

Yes, I'm not sure that we care about this anymore, now that --via-ir it's significantly faster

adhusson commented 1 month ago

Closing optimistically