Skip to content

Support parsing: Crystal shard.yml #1312

Description

@mstykow

Summary

Add a bounded static parser for Crystal shard.yml manifests (and optionally shard.lock) so Provenant can surface Crystal package identity, declared license, and dependency intent.

Why track this

  • shard.yml is the official Crystal dependency-manager manifest (Shards ships with Crystal). Every Crystal library/app is expected to have one at the project root.
  • Format is small, static YAML: name, version, license, authors, description, homepage/repository, dependencies / development_dependencies (GitHub/git/path sources with version constraints).
  • Neither Provenant nor ScanCode currently emit Crystal packages. On the crystal-lang/crystal compare-outputs target both scanners report 0 packages despite a rich root shard.yml (name/version/license/deps).
  • Ecosystem size is niche-but-real: ~10k Crystal repos on GitHub; shards.info indexes ~11k shard repositories. Not npm/Cargo mainstream, but comparable to other tracked niche parsers (Raku, Guix, ROS) and low implementation cost because the format is declarative YAML rather than a build language.

Proposed scope (first pass)

  • Parse **/shard.yml for package identity (name, version), declared license, authors/homepage/repository when present.
  • Emit declared dependencies from dependencies and development_dependencies with honest unknowns for intent flags the format does not prove (is_runtime / is_optional / is_direct / is_pinned as appropriate).
  • Optional follow-on: shard.lock for pinned resolved dependency versions.

Explicitly out of scope initially

  • Executing shards / resolving Git remotes
  • Inferring packages from Crystal source without a manifest

Local context

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions