conan icon indicating copy to clipboard operation
conan copied to clipboard

Consider virtualxxxenv=False recipe attributes or equivalent

Open memsharded opened this issue 4 months ago • 0 comments

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

memsharded avatar Oct 22 '25 13:10 memsharded