Skip to content

lib/types/pluginLuaConfig: only merge pre and post when defined#2294

Merged
mergify[bot] merged 1 commit intonix-community:mainfrom
MattSturgeon:luaConfig
Sep 22, 2024
Merged

lib/types/pluginLuaConfig: only merge pre and post when defined#2294
mergify[bot] merged 1 commit intonix-community:mainfrom
MattSturgeon:luaConfig

Conversation

@MattSturgeon
Copy link
Copy Markdown
Member

@MattSturgeon MattSturgeon commented Sep 22, 2024

Follow up to #1876 (comment)

  • Have pre and post default to null
  • Only merge them into content when non-null
  • Mention this in content's description

cc @traxys

@MattSturgeon MattSturgeon requested a review from a team September 22, 2024 16:44
- Have them default to `null`
- Only merge them into `content` when non-null
- Mention this in `content`'s description
@MattSturgeon
Copy link
Copy Markdown
Member Author

@Mergifyio queue

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Sep 22, 2024

queue

✅ The pull request has been merged automatically

Details

The pull request has been merged automatically at 76df096

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Sep 22, 2024

This pull request, with head sha 76df09619d081b23b9dcb3cfd96e541c7f895759, has been successfully merged with fast-forward by Mergify.

This pull request will be automatically closed by GitHub.

As soon as GitHub detects that the sha 76df09619d081b23b9dcb3cfd96e541c7f895759 is part of the main branch, it will mark this pull request as merged.

It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch luaConfig, this means GitHub will fail to detect the merge.

@mergify mergify bot merged commit 76df096 into nix-community:main Sep 22, 2024
@MattSturgeon MattSturgeon deleted the luaConfig branch September 22, 2024 17:36
@stasjok
Copy link
Copy Markdown
Contributor

stasjok commented Sep 23, 2024

Since they are in mkMerge, maybe it's faster to use lib.optional?

@MattSturgeon
Copy link
Copy Markdown
Member Author

I generally default to using mkIf to allow the module system to "do its thing". I guess in this case there's nothing really for the module system to do, so using optional(s) should result in less work done.

Not sure if there's a good way to measure such performance differences though.

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.

3 participants