Skip to content

Deprecate and remove wildcard output selection #16462

@cameel

Description

@cameel

Closes #14363.

Abstract

Deprecate the use of * to select multiple outputs in outputSelection in Standard JSON. Its use should result in a warning and it should eventually be removed.

We may want to replace it with a more descriptive mechanism (e.g. having some special names covering groups of related outputs). If we do keep *, it should return to its original meaning of "all outputs".

Motivation

Standard JSON allows using * to select multiple outputs:

"outputSelection": {
    "contract.sol": {
        "C": ["*"]
    }
}

This used to mean "all outputs", but this is no longer the case. Experimental and IR outputs (#14363) are excluded. The same will likely happen eventually with ethdebug outputs (#16460).

Even if it did mean "all outputs", its usefulness is questionable. For performance it's always better to pick as few outputs as possible. Having a convenient shortcut for this suggests that requesting them all is sometimes a valid option. This is really mostly the case for debugging/testing and should not be done in production. This fact should be documented (#15744), but the intuitiveness of the design should be considered too.

Backwards Compatibility

Deprecation and a warning would be non-breaking. Actual removal from Standard JSON might be not only be breaking but even impossible as the format is supposed to be stable even across breaking compiler versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking change ⚠️low effortThere is not much implementation work to be done. The task is very easy or tiny.low impactChanges are not very noticeable or potential benefits are limited.must have eventuallySomething we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.

    Type

    No type

    Projects

    Status

    Optional

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions