class ShardLockEntry

Overview

Represents a single entry within the shards section of a shard.lock file. It provides details about a specific dependency.

Included Modules

Defined in:

shard/shard_lock_file.cr

Constant Summary

GIT_COMMIT_VERSION = /\+git\.commit\.([0-9a-f]{7,40})\z/

X.Y.Z+git.commit.<sha> is what shards writes when the resolved commit is not itself a released tag. The trailing SHA is the only value that actually identifies the tree, so it is what a pkg:github/#gitlab/#bitbucket PURL should carry — those PURL types define the version as a tag or a commit, and the composite string is neither.

Constructors

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]

Instance Method Detail

def bitbucket : String | Nil #

The Bitbucket repository path (e.g., "owner/repo").


[View source]
def codeberg : String | Nil #

The Codeberg repository path (e.g., "owner/repo").


[View source]
def commit : String | Nil #

The commit SHA embedded in #version, when shards recorded one.


[View source]
def fossil : String | Nil #

The Fossil repository URL.


[View source]
def git : String | Nil #

The Git URL if the dependency is sourced from a Git repository.


[View source]
def github : String | Nil #

The GitHub repository path (e.g., "owner/repo") if sourced from GitHub.


[View source]
def gitlab : String | Nil #

The GitLab repository path (e.g., "owner/repo") if sourced from GitLab.


[View source]
def hg : String | Nil #

The Mercurial repository URL.


[View source]
def path : String | Nil #

The local path if the dependency is a local path dependency.


[View source]
def version : String | Nil #

The version of the locked dependency. Absent for path: entries (and some other lock shapes), in which case it stays nil rather than being filled in with a placeholder: no version is a fact, "unknown" is a fabrication.


[View source]