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

[v1] Add urfave_cli_no_docs build tag #1383

Merged
merged 3 commits into from May 5, 2022
Merged

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented May 3, 2022

What type of PR is this?

  • feature

What this PR does / why we need it:

Add urfave_cli_no_docs build tag

This removes the resulting binary dependency on cpuguy83/md2man and
russross/blackfriday (and a few more packages imported by those),
which saves more than 400 KB (more than 300 KB
once stripped) from the resulting binary.

Which issue(s) this PR fixes:

none (although see some discussions in e.g. #1055)

Special notes for your reviewer:

This is a backport of #1375 to v1 branch.

Testing

Unit tests with this tag set are added to GHA CI (see last commit).

Release Notes

Added support for `urfave_cli_no_docs` tag to reduce the binary size by 300+ KB
in case your application is not using `ToMarkdown` and `ToMan` methods.

@kolyshkin
Copy link
Contributor Author

@kolyshkin kolyshkin commented May 3, 2022

Ah, it seems I have broken CI with an earlier PR. Fixed here.

@kolyshkin kolyshkin marked this pull request as draft May 3, 2022
@kolyshkin
Copy link
Contributor Author

@kolyshkin kolyshkin commented May 3, 2022

Draft until I fix v1 CI (in progress).

@kolyshkin kolyshkin changed the title [v1] Add urfave_cli_no_docs build tag [DO NOT MERGE] [v1] Add urfave_cli_no_docs build tag May 3, 2022
@kolyshkin
Copy link
Contributor Author

@kolyshkin kolyshkin commented May 3, 2022

Draft until #1384 is merged.

@kolyshkin kolyshkin mentioned this pull request May 3, 2022
kolyshkin added 3 commits May 4, 2022
This is in preparation to make docs optional.

Backported from commit aabfea8

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This removes the resulting binary dependency on cpuguy83/md2man and
russross/blackfriday, which saves more than 400 KB (more than 300 KB
once stripped) from the resulting binary.

Document this in README.

(cherry picked from commit 49e43be)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
We run test with the tag set (to make sure nothing is broken).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin marked this pull request as ready for review May 4, 2022
@kolyshkin
Copy link
Contributor Author

@kolyshkin kolyshkin commented May 4, 2022

@meatballhat this one is ready to go!

@meatballhat
Copy link
Member

@meatballhat meatballhat commented May 4, 2022

@kolyshkin did you want to take care of taking the PR out of Draft mode and editing out the [DO NOT MERGE] before I do stuff? I'm happy to take care of those bits, too.

@kolyshkin kolyshkin changed the title [DO NOT MERGE] [v1] Add urfave_cli_no_docs build tag [v1] Add urfave_cli_no_docs build tag May 4, 2022
@kolyshkin
Copy link
Contributor Author

@kolyshkin kolyshkin commented May 4, 2022

@kolyshkin did you want to take care of taking the PR out of Draft mode and editing out the [DO NOT MERGE] before I do stuff? I'm happy to take care of those bits, too.

Sorry, forgot to remove [DO NOT MERGE] yesterday. Done.

Can you please make a release once this is merged?

@meatballhat meatballhat merged commit 575b8b4 into urfave:v1 May 5, 2022
6 checks passed
brandond added a commit to brandond/k3s that referenced this issue Jun 14, 2022
Ref: ettps://github.com/urfave/cli/pull/1383

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/k3s that referenced this issue Jun 14, 2022
From urfave/cli#1383 :
> This removes the resulting binary dependency on cpuguy83/md2man and
> russross/blackfriday (and a few more packages imported by those),
> which saves more than 400 KB (more than 300 KB
> once stripped) from the resulting binary.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/k3s that referenced this issue Jun 14, 2022
From urfave/cli#1383 :
> This removes the resulting binary dependency on cpuguy83/md2man and
> russross/blackfriday (and a few more packages imported by those),
> which saves more than 400 KB (more than 300 KB
> once stripped) from the resulting binary.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/k3s that referenced this issue Jun 14, 2022
From urfave/cli#1383 :
> This removes the resulting binary dependency on cpuguy83/md2man and
> russross/blackfriday (and a few more packages imported by those),
> which saves more than 400 KB (more than 300 KB
> once stripped) from the resulting binary.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/k3s that referenced this issue Jun 14, 2022
From urfave/cli#1383 :
> This removes the resulting binary dependency on cpuguy83/md2man and
> russross/blackfriday (and a few more packages imported by those),
> which saves more than 400 KB (more than 300 KB
> once stripped) from the resulting binary.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to brandond/k3s that referenced this issue Jun 15, 2022
From urfave/cli#1383 :
> This removes the resulting binary dependency on cpuguy83/md2man and
> russross/blackfriday (and a few more packages imported by those),
> which saves more than 400 KB (more than 300 KB
> once stripped) from the resulting binary.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to k3s-io/k3s that referenced this issue Jun 15, 2022
From urfave/cli#1383 :
> This removes the resulting binary dependency on cpuguy83/md2man and
> russross/blackfriday (and a few more packages imported by those),
> which saves more than 400 KB (more than 300 KB
> once stripped) from the resulting binary.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to k3s-io/k3s that referenced this issue Jun 15, 2022
From urfave/cli#1383 :
> This removes the resulting binary dependency on cpuguy83/md2man and
> russross/blackfriday (and a few more packages imported by those),
> which saves more than 400 KB (more than 300 KB
> once stripped) from the resulting binary.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond added a commit to k3s-io/k3s that referenced this issue Jun 15, 2022
From urfave/cli#1383 :
> This removes the resulting binary dependency on cpuguy83/md2man and
> russross/blackfriday (and a few more packages imported by those),
> which saves more than 400 KB (more than 300 KB
> once stripped) from the resulting binary.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
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.

None yet

2 participants