Skip to content

Use toString on attrs having outPath #15

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

Merged
merged 1 commit into from
Jul 1, 2025
Merged

Conversation

vic
Copy link
Owner

@vic vic commented Jul 1, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings July 1, 2025 16:19
Copilot

This comment was marked as outdated.

@vic vic force-pushed the vic/jj-change-tprqoklsklxq branch from 13e7946 to ec7e554 Compare July 1, 2025 16:27
@vic vic requested a review from Copilot July 1, 2025 16:28
Copy link
Contributor

@Copilot 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 extends the import-tree logic to recognize attribute sets that provide an outPath, treating them like file trees. It introduces a new hasOutPath predicate and updates tests to verify this behavior.

  • Add a branch in default.nix to call listFilesRecursive on x.outPath when hasOutPath x is true.
  • Define a helper hasOutPath predicate.
  • Add a new test case in checkmate.nix to cover attr-sets with outPath.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
default.nix Add hasOutPath helper and branch to handle attrs with outPath.
checkmate.nix Add test verifying import-tree works on attr-sets with outPath.
Comments suppressed due to low confidence (2)

default.nix:74

  • [nitpick] Consider adding a brief comment above hasOutPath to explain its purpose (detecting attr-sets with an outPath) for future maintainers.
  hasOutPath = and (x: x ? outPath) builtins.isAttrs;

checkmate.nix:197

  • [nitpick] The test name is a bit vague—consider renaming it to something more descriptive like test import-tree accepts attr-set with outPath.
        import-tree."test take as arg anything path convertible" = {

@vic vic merged commit e6603e9 into main Jul 1, 2025
1 check passed
@vic vic deleted the vic/jj-change-tprqoklsklxq branch July 1, 2025 16:31
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.

1 participant