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

installShellFiles: ensure shell completion has more than 256 bytes #247099

Draft
wants to merge 2 commits into
base: staging
Choose a base branch
from

Conversation

otavio
Copy link
Contributor

@otavio otavio commented Aug 4, 2023

Description of changes

I found an error in the completion script of tmuxp which were outputting
an error message instead of a proper script so a sanity check in the
installShellCompletion script is helpful to avoid this to happen in the
future.

After looking at possible ways to detect this, the only valid check I
found was based on the generated file size as any completion script I
could find had more than 256 bytes.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@otavio otavio changed the title Avoid too small shell completions installShellFiles: ensure shell completion has more than 256 bytes Aug 4, 2023
@ofborg ofborg bot added the 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild label Aug 4, 2023
@otavio otavio marked this pull request as ready for review August 4, 2023 16:35
@otavio otavio marked this pull request as draft August 4, 2023 17:59
@lucasew
Copy link
Contributor

lucasew commented Aug 5, 2023

Running nixpkgs-review to find other examples like terraform

@lucasew
Copy link
Contributor

lucasew commented Aug 5, 2023

image

I found an error in the completion script of tmuxp which were outputting
an error message instead of a proper script so a sanity check in the
installShellCompletion script is helpful to avoid this to happen in the
future.

After looking at possible ways to detect this, the only valid check I
found was based on the generated file size as any completion script I
could find had more than 256 bytes.

Signed-off-by: Otavio Salvador <[email protected]>
@otavio otavio force-pushed the avoid-too-small-shell-completions branch from 19d1eb9 to 32c275a Compare August 5, 2023 20:51
Copy link
Contributor

@lucasew lucasew left a comment

Choose a reason for hiding this comment

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

I think you should rename that terraform commit to a treewide one and move the package fixes to that commit.

nixpkgs-review is doing nix log with all the failed derivations and it will take some time

@lucasew
Copy link
Contributor

lucasew commented Aug 6, 2023

image

can't nixpkgs-review it

it's not going to fit

@Artturin
Copy link
Member

Artturin commented Oct 5, 2023

Status?

@otavio
Copy link
Contributor Author

otavio commented Oct 5, 2023

@Artturin it is ready, I'd need a full build log to fix any breakage of packages.

@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 19, 2024
@amaxine amaxine removed their request for review April 27, 2024 17:55
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 27, 2024
@wegank wegank added 2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md labels Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 10.rebuild-darwin: 501+ 10.rebuild-darwin: 5001+ 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild 10.rebuild-linux: 501+ 10.rebuild-linux: 5001+
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants