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

Remove broken Go tutorial code and fix typo #73

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

MattyKuzyk
Copy link

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

@cloudhan cloudhan requested a review from alexeagle December 13, 2022 01:15
@alexeagle
Copy link
Contributor

@chrislovecnm look right to you?

@chrislovecnm
Copy link
Contributor

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
Copy link
Author

MattyKuzyk commented Dec 19, 2022

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
Copy link
Author

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

@@ -424,7 +415,7 @@ and created new `BUILD.bazel` files as well. Here is a layout of the Bazel files
   └── BUILD.bazel
```

The `WORKSPACE` file was updated as well, and we have a new file called `deps.bzl`.
The `WORKSPACE` file was updated as well, now loading the go dependecy definitions from a new file called `deps.bzl`.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's typo in the new text: dependecy should be dependency

@chrislovecnm
Copy link
Contributor

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
Copy link
Contributor

I created #74 to fix the deps.bzl problem. @MattyKuzy what do you think?

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

Successfully merging this pull request may close these issues.

4 participants