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

Add urfave_cli_no_docs build tag #1375

Merged
merged 4 commits into from Apr 26, 2022
Merged

Add urfave_cli_no_docs build tag #1375

merged 4 commits into from Apr 26, 2022

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, 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:

none

Testing

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.

This is in preparation to make docs optional.

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.
We run test with the tag set (to make sure nothing is broken),
and also the check-binary-size target (for informational purposes only).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin requested a review from a team as a code owner April 25, 2022 18:04
@kolyshkin
Copy link
Contributor Author

Result of check-binary-size CI job, defaults:

1.7MB is the current binary size

Same with urfave_cli_no_docs:

1.4MB is the current binary size

Are we planning on v3 yet? In there, we can move docs to a separate package, so it won't be compiled in unless explicitly included.

@meatballhat meatballhat added the area/v2 relates to / is being considered for v2 label Apr 26, 2022
@meatballhat meatballhat added this to the Release 2.5.0 milestone Apr 26, 2022
@meatballhat meatballhat mentioned this pull request Apr 26, 2022
20 tasks
@meatballhat
Copy link
Member

Result of check-binary-size CI job, defaults:

1.7MB is the current binary size

Same with urfave_cli_no_docs:

1.4MB is the current binary size

🎉 🤘🏼

Are we planning on v3 yet? In there, we can move docs to a separate package, so it won't be compiled in unless explicitly included.

Added to the list!

Copy link
Member

@meatballhat meatballhat left a comment

Choose a reason for hiding this comment

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

🎉

@meatballhat meatballhat added the kind/feature describes a code enhancement / feature request label Apr 26, 2022
@meatballhat meatballhat merged commit 77fb75a into urfave:main Apr 26, 2022
@kolyshkin
Copy link
Contributor Author

v1 backport: #1383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/v2 relates to / is being considered for v2 kind/feature describes a code enhancement / feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants