Skip to content

Conversation

@mariolopjr
Copy link
Contributor

Very small spelling fix. Noticed an error in the README for the following code snippet:

# modules/routes.nix
{ den, ... }:
let
  noop = _: { };

  by-platform-config = { host }:
    vix.${host.system} or noop;

  user-provides-host-config = { user, host }:
    vix.${user.aspect}._.${host.aspect} or noop;

  host-provides-host-config = { user, host }:
    vix.${host.aspect}._.${user.aspect} or noop;

  route = locator: { user, host }@ctx: 
    (locator ctx) ctx;
in 
{
  den.aspects.routes.__functor = 
    den.lib.parametric true;
  den.aspects.routes.includes = 
    map route [
      user-provides-host-config
      host-provides-user-config
      by-platform-config
    ];
}

The method in this example is host-provides-host-config, but should be host-provides-user-config; the second host should be user.

Copilot AI review requested due to automatic review settings November 5, 2025 23:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR corrects a naming inconsistency in the README documentation. The function name host-provides-host-config has been renamed to host-provides-user-config to accurately reflect that it provides configuration for the user aspect (as evidenced by the function accessing user.aspect in its return value), not the host aspect.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vic
Copy link
Owner

vic commented Nov 5, 2025

Thank you!

I've been tempted not to use code examples in the README as they are not checked (all our code in template/default IS checked). But at the same time, I want the README to provide a way for people to know how to use den. So, maybe the examples in README have runtime failures, thanks for checking a fixing.

@vic vic merged commit 6006fa0 into vic:main Nov 5, 2025
9 checks passed
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