Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--show-output (and related options show nothing in column 2) when using DefaultInfo with default_outs #543

Open
nathanaelhuffman opened this issue Jan 22, 2024 · 1 comment

Comments

@nathanaelhuffman
Copy link

nathanaelhuffman commented Jan 22, 2024

I'll caveat this with the comment that I'm very new to playing with buck2, so it's possible I'm doing something wrong or have incorrect expectations.

While building some .bzl files to support a build flow I noticed that if I have rule returning a DefaultInfo(default_outs=<someList>) the --show-output command when doing buck2 build shows nothing in the 2nd column of the output, whereas I think it should show the outputs list? This is true for the other show output commands as well (full, json etc) ie none of these show the output information either.

If i change the return to do DefaultInfo(default_out=<someList>[0]) ie just picking the first element in the list, the --show-output command shows the expected info in the 2nd output column.

Is it expected that nothing is shown when DefaultInfo uses default_outs?

@JakobDegen
Copy link
Contributor

JakobDegen commented Feb 7, 2024

This particular example is, I think, just a bug.

But more generally, I don't think we always know. The possibility of having multiple outputs was added to buck2 because we thought it was generally a good idea. However, based on something I heard from @cjhopman , we never really used it internally because it turned out that too much stuff broke if --show-output returned more than one output. Instead, we've mostly gone with subtargets to make any additional outputs available.

The result of that is that the "multiple outputs" support is only partially complete, and I don't think we ever fully figured out what we want from it. If you want to stay on the well-trodden path, not using it would probably be your best bet. On the other hand, the fact that this isn't really figured out yet also means that we'd be happy to take PRs that build this support out and clarify how things should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants