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

nix: minify genpolicy binary size #124

Merged
merged 1 commit into from
Feb 1, 2024
Merged

nix: minify genpolicy binary size #124

merged 1 commit into from
Feb 1, 2024

Conversation

malt3
Copy link
Contributor

@malt3 malt3 commented Feb 1, 2024

Since we are embedding the genpolicy tool as part of the nunki cli, it is desirable to make the binary size smaller. This change takes the size from ~152M down to ~18M.

@malt3 malt3 requested a review from katexochen as a code owner February 1, 2024 14:57
@katexochen
Copy link
Member

We should be definitely using this for release. However, please note that this results in cryptic and totally unusable errors on genpolicy failures (which occur quite often).

@malt3
Copy link
Contributor Author

malt3 commented Feb 1, 2024

We should be definitely using this for release.

On the other hand, it makes remote nix builds super slow, since I need to download 150M on every trivial cli change.
Maybe this can be the default and we add a more general debugging flag or a way to specify the path to a different version of genpolicy?

packages/genpolicy_kata.nix Outdated Show resolved Hide resolved
@malt3 malt3 force-pushed the feat/genpolicy-size branch from d072823 to c5a0712 Compare February 1, 2024 15:32
Since we are embedding the genpolicy tool as part of the nunki
cli, it is desirable to make the binary size smaller.
This change takes the size from ~152M down to ~18M.
@malt3 malt3 force-pushed the feat/genpolicy-size branch from c5a0712 to 325b380 Compare February 1, 2024 15:33
@malt3 malt3 merged commit 883ebf4 into main Feb 1, 2024
5 checks passed
@malt3 malt3 deleted the feat/genpolicy-size branch February 1, 2024 16:43
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