bazel icon indicating copy to clipboard operation
bazel copied to clipboard

[bazel.build] Problem with /docs/user-manual: would be nice to document how the output of --workspace_status_command can be used

Open filmil opened this issue 3 years ago • 11 comments

It would be nice to have a self-contained example of --workspace_status_command use.

While the page describes how to make a script, it does not even link to a place that explains how the resulting output can be used.

filmil avatar Jan 07 '23 08:01 filmil

Hello @filmil, Can you add the link of the page which you are referring on the above. Thanks!

sgowroji avatar Jan 09 '23 04:01 sgowroji

This one: https://bazel.build/docs/user-manual#workspace-status

filmil avatar Jan 09 '23 04:01 filmil

I want to work on this issue. Please assign me this issue .

ghost avatar Jan 31 '23 16:01 ghost

Hello can anyone help me how to start contributing,as I am new here.

kamallochan2004 avatar Mar 30 '23 14:03 kamallochan2004

Hello can anyone help me how to start contributing,as I am new here. @kamallochan2004

  • Please refer CONTRIBUTING.md https://github.com/bazelbuild/bazel/blob/e12c44da8efb77a5d87c00e64499ac3c504ae943/CONTRIBUTING.md for CLA

  • If required do refer git documentation for basic commands

  • Look for "good first issue" label under issues section

  • Use best practices of contributing like forking the repo, creating a branch apart from master, and adding comments to your commits

  • Open a Pull Request, tagging the issue, updating checklist and tests(as required)

singhalashish16 avatar May 11 '23 11:05 singhalashish16

May i take up this issue if not being worked on

pernelkanic avatar Aug 09 '23 01:08 pernelkanic

hello everyone! If this issue is open and no one is working on this @filmil I request you to assign me this issue as I've gone through the documentation throughly.

shankkyy avatar Feb 25 '24 20:02 shankkyy

@shankkyy I do not have permissions in the bazel repo, someone else will need to assign you.

filmil avatar Feb 26 '24 04:02 filmil

@shankkyy I'd say just go for forking and pushing a PR regardless of the assignment. This will benefit all of us in the end. This issue will still be closed and linked to your PR should you complete the task.

jxramos avatar Nov 09 '24 00:11 jxramos

I agree, a simple example like this would suffice to illustrate with.

py_library(
    name = "metadata",
    srcs = ["metadata.py"],
    visibility = ["//visibility:public"],
)

genrule(
    name = "gen_metadata",
    outs = ["metadata.py"],
    cmd = """echo '\"\"\"Generated from gen_metadata' > $@
        echo "class VolatileMetadata:" >> $@
        awk '{print "    " $1 "=\"" $2 "\""}' bazel-out/volatile-status.txt >> $@
    """,
    stamp = 1,
)

jxramos avatar Jun 23 '25 19:06 jxramos

@filmil

Hi everyone 👋

I’m going to open a PR that adds a simple, self-contained example for --workspace_status_command in the user manual, including a script, sample output, and a small genrule example.

Following the suggestion to proceed without assignment. Thanks!

shivanshjais22 avatar Jan 26 '26 08:01 shivanshjais22