#17004·solidity

CompilerStack full reset retains experimental and debug info settings

Author: DicksonWu654Created Sep 11, 2026Updated Sep 12, 2026

Description

CompilerStack::reset(false) is documented and implemented as a full reset of compiler settings. However, it does not restore m_experimental or m_debugInfoSelection to their defaults. Reusing a stack after enabling experimental mode or selecting non-default debug info can therefore change the behavior or output of the next compilation despite requesting a full reset.

reset(true) should continue retaining both settings, while reset(false) should restore experimental mode to false and debug info selection to DebugInfoSelection::Default().

Environment

  • Compiler version: current develop (c9e112d18)
  • Compilation pipeline: all (observable with analysis for experimental mode and IR output for debug info)
  • Target EVM version: default
  • Framework/IDE: direct CompilerStack API
  • EVM execution environment / backend / blockchain client: not applicable
  • Operating system: Linux

Steps to Reproduce

  1. Construct a CompilerStack.
  2. Call setExperimental(true) or selectDebugInfo(DebugInfoSelection::None()).
  3. Call reset(false).
  4. Compile a new source.

The new compilation still uses the previous experimental/debug-info setting instead of the documented defaults.