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

Tidy up README.md #290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisnovakovic
Copy link
Contributor

  • Create a new section explicitly describing the installation process.
  • Add the definition of a go_toolchain to the installation instructions.
  • Drop dangling reference to (the now-deprecated) go_get.
  • Drop the warning at the end of the document about how a Go toolchain is required for Go 1.20+ (which everyone ought to be using by now, given that 1.20 fell out of support upstream some time ago).
  • Some other minor formatting and wording improvements.

* Create a new section explicitly describing the installation process.
* Add the definition of a `go_toolchain` to the installation
  instructions.
* Drop dangling reference to (the now-deprecated) `go_get`.
* Drop the warning at the end of the document about how a Go toolchain
  is required for Go 1.20+ (which everyone ought to be using by now,
  given that 1.20 fell out of support upstream some time ago).
* Some other minor formatting and wording improvements.
@chrisnovakovic chrisnovakovic added the documentation Improvements or additions to documentation label Aug 23, 2024
```python
plugin_repo(
name = "go",
revision="vx.x.x",
revision = "vx.x.x", # A go-rules version
Copy link
Contributor

Choose a reason for hiding this comment

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

Where should the reader find which version to use?


# Installation

First, add the plugin to your Please repo. In `plugins/BUILD`:
Copy link
Contributor

Choose a reason for hiding this comment

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

It isn't strictly required that it be plugins/BUILD; can we rephrase this?

[Plugin "go"]
Target = //plugins:go
GoTool = //third_party/go:toolchain|go
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to add Stdlib here?

Go is especially suited to writing command line tools and utilities. Binaries can be run with `plz run`, or used
as tools for [custom rules](https://please.build/codelabs/genrule/#0).

# Installation
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just recommend using plz init plugin go here? (and maybe leave the manual process as an appendix)

Next, define a version of Go for the plugin to use. In `third_party/go/BUILD`:

```python
subinclude("///go//build_defs:go")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we recommend

[parse]
preloadsubincludes = ///go//build_defs:go

(plz plugin init sets this up)

Copy link

Choose a reason for hiding this comment

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

Agreed.

The phases of plz initialization and implicit actions are barriers to entry. Documentation should put users on the happy path/path of least resistance, not the path of maximal detail. The detail needs to be explained someplace, but it shouldn't be in the readmes that get things up to speed for a user. If people want to see what changed, git diff should be sufficient to see what happens when someone runs plz plugin init go, or whatever. $0.02.

)
```

Introduce dependencies on third-party Go modules with `go_repo`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth a reference to puku here?

Copy link

Choose a reason for hiding this comment

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

Worth doing, but puku is not quite my friend yet: I still routinely fall back to go_module and find myself fighting puku sync with some degree of regularity. The idealized end-to-end workflow for "day in the life of an engineer using a repo with plz" isn't well defined and requires a fair amount of digging.

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

Successfully merging this pull request may close these issues.

3 participants