Skip to content

Consider virtualxxxenv=False recipe attributes or equivalent #19139

@memsharded

Description

@memsharded

The idiom

def generate(self):
    VirtualBuildEnv(self)  # without generate

is a bit obscure.

Ah. I see that now, but the same isn't documented for https://docs.conan.io/2/reference/tools/env/virtualrunenv.html. And I missed that subtle detail 9the constructor defaults to auto_generate = False, and this affects the implicit instance too!) when looking (when is when I started searching for existing issues before writing one). But yes, I see it now (for VirtualBuildEnv)

My vote would have been that virtualbuildenv = False is clearer and more obviously intentional than a subtle interaction with the constructor (which ends up kind of looks like a accidental omission/merging error), but if that's the way you want to document I can certainly do what the docs say (and just put a comment next to it that skipping generate is intentional).

Originally posted by @puetzk in #13751

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions