Skip to content

Conversation

@alfarelcynthesis
Copy link
Contributor

Nixpkgs is in the process of migrating some of it's type merging code: NixOS/nixpkgs#375084.
This migrates the one instance of wrapper I could find in nvf's lib.

This isn't particularly urgent since it won't throw any warnings unless the lib is being merged as part of a module system, which would be a very strange usecase for an external consumer.

This could be easily rebased to target main, if that would be preferred.

Sanity Checking

  • I have updated the changelog as per my changes
  • I have tested, and self-reviewed my code
  • My changes fit guidelines found in hacking nvf
  • Style and consistency
    • I ran Alejandra to format my code (nix fmt)
    • My code conforms to the editorconfig configuration of the project
    • My changes are consistent with the rest of the codebase
  • If new changes are particularly complex:
    • My code includes comments in particularly complex areas
    • I have added a section in the manual
    • (For breaking changes) I have included a migration guide
  • Package(s) built:
    • .#nix (default package)
    • .#maximal
    • .#docs-html (manual, must build)
    • .#docs-linkcheck (optional, please build if adding links)
  • Tested on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin

Add a 👍 reaction to pull requests you find important.

This is the more modern approach: NixOS/nixpkgs#375084
The above PR does this for similar cases in nixpkgs.

This fixes a warning that shows up when using the lib in weird ways:

```
trace: evaluation warning: The deprecated `functor.wrapped` attribute is accessed, use `nestedTypes.elemType` instead.
```

The warning is thrown by the module system when merging types
(at least in some cases).
It shouldn't be exposed at all in the current codebase.
@NotAShelf
Copy link
Owner

I'm sorry I never got the notification for this PR. Looks like I inadvertently superseded this in #1209 so your feedback would be appreciated :)

@alfarelcynthesis
Copy link
Contributor Author

This was honestly just me fixing the one source of the warnings you mention in #1209 that I could find (which is why I never bothered re-pinging for it), thanks for actually fixing the issue I was running into.

I initially ran into the warnings when setting up a configurable default for the keymap option functions, so I'll look into that again (for disabling all nvf keymaps) at some point and let you know if all the warnings are gone, since I don't know the actual merge semantics, and since #1209 is already merged.

In either case, this PR isn't necessary, so I'll close it.

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