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

Move examples within bazelbuild/bazel into bazelbuild/examples repository #201

Open
limdor opened this issue Apr 27, 2021 · 6 comments
Open

Comments

@limdor
Copy link
Contributor

limdor commented Apr 27, 2021

There is already a folder with bazel examples inside the bazel repository
https://github.com/bazelbuild/bazel/tree/master/examples

It would be good to add in the readme a reference to it and a small sentence explaining what is the difference or why they are separated. It would be nice in the future to have them in a single place and not have them splited between this repo and the bazelbuild/bazel repo.

@aiuto
Copy link
Contributor

aiuto commented Apr 28, 2021

We should deprecate examples within bazelbuild/bazel in favor of bazelbuild/examples.
The biggest problem with examples in the bazel repo is that we don't want to have examples that depend on repos beyond what is needed to build bazel. That artifically limits us.

We don't need an explanation. We just need to

  • move them to bazelbuild/examples
  • provide a versioning scheme so there is an examples branch or tree for each LTS track

@limdor limdor changed the title Explain difference with examples from bazel repository Move examples within bazelbuild/bazel into bazelbuild/examples repository Apr 28, 2021
@limdor
Copy link
Contributor Author

limdor commented Apr 28, 2021

Make sense, I just renamed the ticket to reflect this. If you already have another ticket for that we can close it. Should we create also one in bazelbuild/bazel to put everyone in sync or no need for that?

limdor added a commit to limdor/bazel that referenced this issue Jun 5, 2023
limdor added a commit to limdor/bazel that referenced this issue Jun 5, 2023
There is already a cpp example in bazelbuild/examples.
See: https://github.com/bazelbuild/examples/tree/main/cpp-tutorial

The one in bazelbuild/examples is referred in https://bazel.build/start/cpp
and it contains everything that this example contains.
The only part missing in the example in bazelbuild/examples is to have
a cc_test but this is covered in https://bazel.build/tutorials/cpp-use-cases#run-c-tests

This would bring us closer to bazelbuild/examples#201
@limdor
Copy link
Contributor Author

limdor commented Jun 5, 2023

We should deprecate examples within bazelbuild/bazel in favor of bazelbuild/examples. The biggest problem with examples in the bazel repo is that we don't want to have examples that depend on repos beyond what is needed to build bazel. That artifically limits us.

We don't need an explanation. We just need to

  • move them to bazelbuild/examples
  • provide a versioning scheme so there is an examples branch or tree for each LTS track

@aiuto did your opinion on this topic changed? Just asking because this was some time ago and before I create too many PR I would like to confirm that this is still the wish of the Bazel team.

limdor added a commit to limdor/bazel-examples that referenced this issue Jun 5, 2023
Bazel has two places with examples, bazelbuild/build and
bazelbuild/examples. The first one is where the examples where
originally but the second is where most of the examples are and where
they should be long term.

See: bazelbuild/examples#201
@aiuto
Copy link
Contributor

aiuto commented Jun 6, 2023

My opinion did not change, but it's not really my call.
I add my new examples to examples, because they can run on CI, so I have some belief they are really working ones. And it is a much lower barrier to entry than changing the docs on bazelbuild/bazel. We can approve PRs directly against examples.

@limdor
Copy link
Contributor Author

limdor commented Jun 6, 2023

Ok thanks for the feedback. Whose call would be? It would be nice in order to have the example a bit more organized and less spread around.

limdor added a commit to limdor/bazel that referenced this issue Jun 6, 2023
There is already a cpp example in bazelbuild/examples.
See: https://github.com/bazelbuild/examples/tree/main/cpp-tutorial

The one in bazelbuild/examples is referred in https://bazel.build/start/cpp
and it contains everything that this example contains.
The only part missing in the example in bazelbuild/examples is to have
a cc_test but this is covered in https://bazel.build/tutorials/cpp-use-cases#run-c-tests

This would bring us closer to bazelbuild/examples#201
@aiuto
Copy link
Contributor

aiuto commented Jun 6, 2023

@radvani13 is the product manager. @meteorcloudy leads the team that "delivers" Bazel, so that includes CI and the doc generation pipeline. We don't, sadly, have a dedicated documentation specialist for either the site or the examples. Our process has been to try to match incoming PRs to the the best subject matter reviewer. That is best suited for targeted additions rather than large restructurings. I recently rewrote the README to provide a cookbook style index into the examples.
https://github.com/bazelbuild/examples
While that provides an index, when you land on each section, there should be much more text. For example, the index has "A rule with both explict and implicit outputs", but the folder does not have a README talking about why rules might have implicit outputs.

copybara-service bot pushed a commit to bazelbuild/bazel that referenced this issue Jun 7, 2023
See: bazelbuild/examples#201

Closes #18581.

PiperOrigin-RevId: 538469631
Change-Id: Ib0cfc6de5d9f0d2cc4fc045b47c2d8ce5a6b358e
amishra-u pushed a commit to amishra-u/bazel that referenced this issue Jun 7, 2023
See: bazelbuild/examples#201

Closes bazelbuild#18581.

PiperOrigin-RevId: 538469631
Change-Id: Ib0cfc6de5d9f0d2cc4fc045b47c2d8ce5a6b358e
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