Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kolyshkin
Copy link
Contributor

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 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 02:15
@kolyshkin
Copy link
Contributor Author

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

Draft until #1384 is merged.

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

Backported from commit aabfea8

Signed-off-by: Kir Kolyshkin <[email protected]>
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 <[email protected]>
We run test with the tag set (to make sure nothing is broken).

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin kolyshkin marked this pull request as ready for review May 4, 2022 03:19
@kolyshkin
Copy link
Contributor Author

@meatballhat this one is ready to go!

@meatballhat
Copy link
Member

@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 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
brandond added a commit to brandond/k3s that referenced this pull request Jun 14, 2022
Ref: ettps://github.com/urfave/cli/pull/1383

Signed-off-by: Brad Davidson <[email protected]>
brandond added a commit to brandond/k3s that referenced this pull request 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 <[email protected]>
brandond added a commit to brandond/k3s that referenced this pull request 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 <[email protected]>
brandond added a commit to brandond/k3s that referenced this pull request 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 <[email protected]>
brandond added a commit to brandond/k3s that referenced this pull request 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 <[email protected]>
brandond added a commit to brandond/k3s that referenced this pull request 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 <[email protected]>
brandond added a commit to k3s-io/k3s that referenced this pull request 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 <[email protected]>
brandond added a commit to k3s-io/k3s that referenced this pull request 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 <[email protected]>
brandond added a commit to k3s-io/k3s that referenced this pull request 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 <[email protected]>
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.

2 participants