CompilerStack full reset retains experimental and debug info settings
- Dominant language
- C++
- Stars
- 25.7k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 21
Description
## 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.
Contributor guide
Research direction
Start at CompilerStack::reset(bool) and trace how reset(false) handles m_experimental and m_debugInfoSelection. Reproduce the issue using setExperimental(true) and selectDebugInfo(DebugInfoSelection::None()), then verify that reset(false) restores false and DebugInfoSelection::Default() while reset(true) retains both settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100