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

zsh: adjust initContent priorities #6676

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

khaneliman
Copy link
Collaborator

@khaneliman khaneliman commented Mar 21, 2025

To support easier migration of deprecating old zsh options. We can adjust the internal priorities to fit within the mkBefore (500) and default (1000). Makes it easier for initExtraFirst migrationg to mkBefore and initExtra to default prio.

Predecessor to #6664

We can iron out the priorities more, just wanted to quickly whip something up to get a discussion going.

Description

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all
    or nix build --reference-lock-file flake.lock ./tests#test-all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@github-actions github-actions bot added the shell label Mar 21, 2025
@khaneliman khaneliman requested a review from teto March 21, 2025 18:49
(lib.mkIf (cfg.initExtraFirst != "") (mkOrder 550 cfg.initExtraFirst))
(lib.mkIf (cfg.initExtraFirst != "") (lib.mkBefore cfg.initExtraFirst))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wasn't sure if we wanted an easy migration of prio here so it's just using the mkBefore prio instead of an arbitrary number.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's fine. We should get rid of it anyway

(lib.mkIf (cfg.initExtra != "") (mkOrder 1200 cfg.initExtra))
(lib.mkIf (cfg.initExtra != "") cfg.initExtra)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing custom prio here allows migration to be easier for initExtra to initContent

To support easier migration of deprecating old zsh options. We can
adjust the internal priorities to fit within the `mkBefore` (500) and
default (1000). Makes it easier for `initExtraFirst` migrationg to
`mkBefore` and `initExtra` to default prio.
@khaneliman khaneliman merged commit 296ddc6 into nix-community:master Mar 21, 2025
3 checks passed
@khaneliman khaneliman deleted the zsh-prio branch March 21, 2025 20:17
ttrssreal pushed a commit to ttrssreal/home-manager that referenced this pull request Mar 22, 2025
To support easier migration of deprecating old zsh options. We can
adjust the internal priorities to fit within the `mkBefore` (500) and
default (1000). Makes it easier for `initExtraFirst` migrationg to
`mkBefore` and `initExtra` to default prio.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants