Skip to content

Conversation

@NobbZ
Copy link
Owner

@NobbZ NobbZ commented Jan 5, 2026

Summary by CodeRabbit

  • New Features

    • Added support for Container sources in pin management.
  • Bug Fixes

    • Updated Treesitter module configuration path for improved compatibility.
  • Chores

    • Migrated hash values to SHA-256 format and incremented configuration schema version.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR refactors the npins pins system to support version-based dispatch and introduces a new wrapper function mkFunctor for flexible source.json handling. It upgrades sources.json to version 7, updates hash formats to SHA-256, and adds Container source support alongside expanded fetcher handling. A minor import path update is made to the Neovim Treesitter plugin configuration.

Changes

Cohort / File(s) Change Summary
npins Infrastructure
npins/default.nix
Introduces mkFunctor top-level wrapper with input validation (path or attrset); implements version-based dispatch (version 7); adds mkContainerSource for Docker container images; refactors mkSource, mkGitSource, mkPyPiSource, mkChannelSource, mkTarballSource to accept unified fetchers parameter; adds Forgejo repository type support; propagates narHash through fetch logic.
npins Metadata
npins/sources.json
Updates hash values from mixed formats to SHA-256 prefixed strings (sha256-...); increments top-level version field from 5 to 7.
Plugin Configuration
plugins/nobbz/lua/nobbz/treesitter.lua
Updates Treesitter module import path from nvim-treesitter.configs to nvim-treesitter.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant mkFunctor
    participant Input as Input Handler
    participant Dispatcher as Version Dispatcher
    participant Fetchers
    participant Source as Source Fetcher

    User->>mkFunctor: Call with sources.json or attrset
    mkFunctor->>Input: Validate input type (path/attrset)
    alt Path provided
        Input->>Input: Check path existence
    end
    Input->>Dispatcher: Load data and extract version
    alt Version 7
        Dispatcher->>Fetchers: Initialize fetchers (builtin + pkgs)
        Fetchers->>Fetchers: Normalize fetchGit API
    else Version 5 or earlier
        Dispatcher->>Fetchers: Use legacy fetcher setup
    end
    Fetchers->>Source: Dispatch to source type handler
    alt Git/GitHub/GitLab/Forgejo
        Source->>Source: mkGitSource with fetchers
    else PyPi
        Source->>Source: mkPyPiSource with fetchers
    else Channel
        Source->>Source: mkChannelSource with fetchers
    else Tarball
        Source->>Source: mkTarballSource with fetchers
    else Container
        Source->>Source: mkContainerSource with pkgs
    end
    Source-->>User: Return resolved sources attrset
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • add lspsaga #40: Updates npins/default.nix with changes to mkSource/mkGitSource signatures and extends source-type handling, directly overlapping with this PR's refactoring scope.
  • update 2025-05-05 #64: Modifies npins/sources.json pin entries and version field, following the same pattern of updating hashes and version metadata as this PR.
  • update 2024 12 25 #12: Updates npins/sources.json pins and metadata, related through the common sources.json update pattern.

Poem

🐰 A rabbit hops through versions old,
From five to seven, brave and bold!
New Containers spring to life,
Fetchers dance without a strife,
SHAs bloom in hashes bright,
The pins now shimmer in the light! 🌟

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd24a13 and ff9965f.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • npins/default.nix
  • npins/sources.json
  • plugins/nobbz/lua/nobbz/treesitter.lua

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@NobbZ NobbZ merged commit f3c716e into main Jan 5, 2026
2 of 3 checks passed
@NobbZ NobbZ deleted the push-xrvroqwzltnm branch January 5, 2026 15:08
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