-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Feature requested by @alcuadrado.
When the compilation of a specific contract is requested, the compiler may implicitly compile other contracts but will not include their outputs unless they were also requested.
This hides information that could potentially be used by frameworks to avoid unnecessary recompilation in some cases. For example when performing incremental compilation for specific files one by one, the framework could notice that it has already received outputs for one of the files it was planning to request and skip it.
While the extra information can always be requested explicitly, it's not always easy for the user to determine which contracts and outputs can be requested without triggering extra unwanted work, because this changes between compiler versions (e.g. recently as a result of #15373) and the fact that the implicit compilation even happens and under which conditions is not documented.
The feature could work either as an option telling the compiler to include all generated outputs, even if not requested or by allowing the user to conditionally request specific contracts/outputs, only if they happen to be generated anyway.