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

lib/modules: assert that specialArgs has a valid lib #2322

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

MattSturgeon
Copy link
Member

@MattSturgeon MattSturgeon commented Sep 27, 2024

End-users have ran into issues before when attempting to re-use a lib from elsewhere in nixvim's configuration.

If a lib without the nixvim extension is used, the new assertion will explain that this isn't supported.

Nixvim requires a lib that includes some custom extensions, however the `lib` specialArg does not have a `nixvim` attr.
Remove `lib` from nixvim's specialArgs or ensure you apply nixvim's extensions to your lib.

In the future we can also provide better ways for end-users to overlay their own lib with nixvim's extensions, but this is not yet implemented. Draft #2328

@MattSturgeon MattSturgeon requested a review from a team September 27, 2024 00:08
@MattSturgeon MattSturgeon force-pushed the assert_specialArg_lib branch 3 times, most recently from a1d75f6 to fa66fd5 Compare September 27, 2024 09:11
lib/modules.nix Outdated Show resolved Hide resolved
End-users have ran into issues before when attempting to re-use a `lib`
from elsewhere in nixvim's configuration.

If a `lib` without the `nixvim` extension is used, this assertion will
inform the user that this isn't supported.

In the future we can also provide better ways for end-users to overlay
their own lib with nixvim's extensions, but this is not yet implemented.

Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com>
Copy link
Member

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

LGTM !

@MattSturgeon
Copy link
Member Author

@Mergifyio queue

Copy link
Contributor

mergify bot commented Sep 27, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 6b0c5d5

Copy link
Contributor

mergify bot commented Sep 27, 2024

This pull request, with head sha 6b0c5d594ac88e7765c97deeda10c5b6e812f7a7, 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 6b0c5d594ac88e7765c97deeda10c5b6e812f7a7 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 assert_specialArg_lib, this means GitHub will fail to detect the merge.

@mergify mergify bot merged commit 6b0c5d5 into nix-community:main Sep 27, 2024
4 checks passed
@MattSturgeon MattSturgeon deleted the assert_specialArg_lib branch September 27, 2024 12:52
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