Skip to content

fix: skip registry sync when a specific package is requested#22

Open
yashas-hm wants to merge 1 commit into
serverpod:mainfrom
yashas-hm-os:fix/issue-5-get-skills
Open

fix: skip registry sync when a specific package is requested#22
yashas-hm wants to merge 1 commit into
serverpod:mainfrom
yashas-hm-os:fix/issue-5-get-skills

Conversation

@yashas-hm
Copy link
Copy Markdown

Summary

  • skills get <package> no longer clones or updates git registry repositories as a side-effect. Registry sync now only runs for an unfiltered skills get.
  • Already-cloned local registries are still scanned during targeted installs, so they remain available if they happen to contain skills for the requested package.

Details

Previously, RegistrySync.sync() was called unconditionally, cloning all configured registries (e.g. the Flutter and Serverpod repos) into .dart_tool/skills/repos/ even when the user ran skills get jaspr. The registry skills were correctly filtered after cloning, but the cloning itself always happened, polluting the workspace with unrelated repos.

The fix guards the sync call behind if (packageNames == null), matching the intended semantics: a bare skills get (no args) fetches everything; skills get <package> only installs skills for that specific package without touching unrelated registries.

Test plan

  • New test when installing a specific package then registries are not cloned verifies that a configured global registry is not cloned when skills get dep_pkg is run and dep_pkg has its own Dart skills.
  • Existing registry tests (when git is unavailable, when installing from global registry) continue to pass.
  • Full test suite passes (dart test).

Closes #5
Fixes #5

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.

Cloning all repositories even if not used.

1 participant