bazel-contrib / SIG-rules-authors

Governance and admin for the rules authors Special Interest Group
https://bazel-contrib.github.io/SIG-rules-authors/
Apache License 2.0
30 stars 12 forks source link

Remove broken Go tutorial code and fix typo #73

Open MattyKuzyk opened 1 year ago

MattyKuzyk commented 1 year ago

s/bazelist/bazelisk/g

Also, the line to load the deps.bzl doesn't work if you're trying to follow the tutorial. That file has not been generated yet so any Bazel commands break when the WORKSPACE tries to load it. That code will be generated by bazel run //:gazelle-update-repos

alexeagle commented 1 year ago

@chrislovecnm look right to you?

chrislovecnm commented 1 year ago

We need to fix this rather than delete the line, as it is needed. When you run gazelle first do you have any Build files? Otherwise we need to touch the missing file.

MattyKuzyk commented 1 year ago

I do have the same BUILD file specified by the tutorial. The error was reproduced by following the tutorial to the letter.

Deleting that line is fine. When bazel run //:gazelle-update-repos is run, those lines are auto-generated. If you were to follow the tutorial with these fixes, it will function correctly.

MattyKuzyk commented 1 year ago

This also mimics the workspace file in the official Gazelle Go tutorial

chrislovecnm commented 1 year ago

I think I figured out the fix for it. You need a deps.bizl with a function in it I will submit a PR.

chrislovecnm commented 1 year ago

I created https://github.com/bazel-contrib/SIG-rules-authors/pull/74 to fix the deps.bzl problem. @MattyKuzy what do you think?