Open
Description
Due to performance issues of IR compilation, recently there's been increased interest by frameworks in using outputSelection
to select only the actually necessary contracts and outputs. However, this feature and its quirks were never extensively documented, so it's often used inefficiently, with no easy way for users to find out how it was intended to be used.
We really need some docs on:
- Syntax:
- The special
"*"
and""
values and where they can be used. - Valid outputs in all input modes (Solidity, Yul, evmasm import).
- The special
- Semantics:
- Behavior of wildcards, e.g.:
- Inconsistencies between
"*"
and""
. - The fact that
"*"
does not match experimental outputs (#14363) and a list of such outputs. - The fact that patterns like
"*.sol"
are interpreted literally and only specifically"*"
is a wildcard.
- Inconsistencies between
- Behavior of overlapping selections (e.g.
"*"/"contract"
vs"file.sol"/"*"
). - Other: invalid output names, duplicates, etc.
- Behavior of wildcards, e.g.:
- Lazy compilation
- Which outputs trigger which compilation stages (parsing, analysis, code generation, bytecode generation).
- Implicit compilation due to bytecode dependencies.
- How this functionality changed across compiler versions (it's not straightforward to check because an inefficient selection won't usually produce an error).