Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Update docs to reflect default prune settings #1650

Merged
merged 1 commit into from
Feb 21, 2018

Conversation

andrewjstone
Copy link
Contributor

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

@googlebot
Copy link
Collaborator

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. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot. The email used to register you as an authorized contributor must be the email used for the Git commit.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@@ -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.

Copy link
Collaborator

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.

Copy link
Collaborator

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 through dep init will enable go-tests and unused-packages prune options by default.

Copy link
Contributor Author

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.

@jmank88 jmank88 mentioned this pull request Feb 8, 2018
@@ -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
Copy link
Collaborator

@ibrasho ibrasho Feb 8, 2018

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

@@ -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.

Copy link
Collaborator

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 through dep init will enable go-tests and unused-packages prune options by default.

@@ -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.
Copy link

@nhooyr nhooyr Feb 9, 2018

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 enable go-tests and unused-packages prune options by default.

is better, just so its clear its not magical.

Choose a reason for hiding this comment

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

Concur

Copy link
Collaborator

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 via dep init will add lines to enable go-tests and unused-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.

Copy link

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.

@ibrasho
Copy link
Collaborator

ibrasho commented Feb 19, 2018

@andrewjstone Could you please sign the CLA?

@googlebot
Copy link
Collaborator

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link
Collaborator

CLAs look good, thanks!

@andrewjstone
Copy link
Contributor Author

I rebased to a single commit and changed my email address to my employer so the CLA would be signed.

@sdboyer sdboyer merged commit d87e823 into golang:master Feb 21, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants