-
Notifications
You must be signed in to change notification settings - Fork 1k
Update docs to reflect default prune settings #1650
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
docs/Gopkg.toml.md
Outdated
@@ -192,7 +192,8 @@ The following are the current available options: | |||
|
|||
Out of an abundance of caution, dep non-optionally preserves files that may have legal significance. | |||
|
|||
Pruning is disabled by default. It can be enabled by setting them to `true` at the root level. | |||
Pruning is enabled by default for `go-tests` and `unused-packages`. It can disabled by removing those fields from the `[prune]` table at the root level. Pruning can be enabled for `non-go` by setting it to true at the root level. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though the default behavior generating a Gopkg.toml
during init
is to add go-tests
and unused-packages
, I think the language here is referring to the default behavior during processing of a Gopkg.toml
when no explicit true
/false
value is provided. That being said, the original text could still use some clarification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @jmank88 . How about:
Pruning options are disabled by default. Generating a
Gopkg.toml
generate throughdep init
will enablego-tests
andunused-packages
prune options by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok. That makes sense. I will change the wording.
docs/Gopkg.toml.md
Outdated
@@ -192,7 +192,8 @@ The following are the current available options: | |||
|
|||
Out of an abundance of caution, dep non-optionally preserves files that may have legal significance. | |||
|
|||
Pruning is disabled by default. It can be enabled by setting them to `true` at the root level. | |||
Pruning is enabled by default for `go-tests` and `unused-packages`. It can disabled by removing those fields from the `[prune]` table at the root level. Pruning can be enabled for `non-go` by setting it to true at the root level. | |||
|
|||
```toml | |||
[prune] | |||
non-go = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend replacing this line with:
go-tests = true
unused-packages = true
docs/Gopkg.toml.md
Outdated
@@ -192,7 +192,8 @@ The following are the current available options: | |||
|
|||
Out of an abundance of caution, dep non-optionally preserves files that may have legal significance. | |||
|
|||
Pruning is disabled by default. It can be enabled by setting them to `true` at the root level. | |||
Pruning is enabled by default for `go-tests` and `unused-packages`. It can disabled by removing those fields from the `[prune]` table at the root level. Pruning can be enabled for `non-go` by setting it to true at the root level. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @jmank88 . How about:
Pruning options are disabled by default. Generating a
Gopkg.toml
generate throughdep init
will enablego-tests
andunused-packages
prune options by default.
docs/Gopkg.toml.md
Outdated
@@ -192,10 +192,12 @@ The following are the current available options: | |||
|
|||
Out of an abundance of caution, dep non-optionally preserves files that may have legal significance. | |||
|
|||
Pruning is disabled by default. It can be enabled by setting them to `true` at the root level. | |||
Pruning options are disabled by default. However, generating a `Gopkg.toml` via `dep init` will enable `go-tests` and `unused-packages` prune options by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
dep init
will add lines to enablego-tests
andunused-packages
prune options by default.
is better, just so its clear its not magical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concur
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about:
However, generating a
Gopkg.toml
viadep init
will add lines to enablego-tests
andunused-packages
prune options by default.
Unless the trailing 'by default' is referring to how projects inherit from the root settings - In that case, I think 'at the root level' is more clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep the prune options
part and only remove the by default
part.
@andrewjstone Could you please sign the CLA? |
7beaccb
to
3504ee1
Compare
CLAs look good, thanks! |
1 similar comment
CLAs look good, thanks! |
I rebased to a single commit and changed my email address to my employer so the CLA would be signed. |
What does this do / why do we need it?
The default prune settings have changed, but the docs have not been updated.
What should your reviewer look out for in this PR?
N/A
Do you need help or clarification on anything?
No
Which issue(s) does this PR fix?
This PR updates the docs for the following PR: #1460