Skip to content

Requesting implicitly generated outputs #15742

@cameel

Description

@cameel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    low effortThere is not much implementation work to be done. The task is very easy or tiny.medium impactDefault level of impactshould haveWe like the idea but it’s not important enough to be a part of the roadmap.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions