yaoxiang.lock Format
yaoxiang.lock is YaoXiang's dependency lock file, recording the exact version information for all dependencies.
Overview
- Auto-generated: Automatically generated and updated by
yaoxiang installandyaoxiang update - Do not edit manually: This file is automatically maintained by the package manager
- Should be committed to version control: Ensures team members and CI builds use the same dependency versions
File Structure
toml
# Auto-generated by YaoXiang package manager
[package]
version = 1
[package.dependency-name]
version = "version number"
source = "source type"
checksum = "checksum (optional)"Field Descriptions
[package] Section
| Field | Type | Description |
|---|---|---|
version | integer | Lock file format version, currently 1 |
[package.<name>] Section
| Field | Type | Description |
|---|---|---|
version | string | Resolved exact version number |
source | string | Dependency source: registry, git, or path |
checksum | string | SHA-256 checksum (optional) |
Example
toml
# Auto-generated by YaoXiang package manager
# 2024-01-15 10:30:00
[package]
version = 1
[package.http]
version = "1.0.0"
source = "registry"
checksum = "abc123..."
[package.json]
version = "2.0.0"
source = "registry"
[package.utils]
version = "0.1.0"
source = "path"
[package.bleeding]
version = "main"
source = "git"Source Types
| Type | Description | Configuration Example |
|---|---|---|
registry | Fetched from remote registry | http = "1.0.0" |
git | Fetched from Git repository | { git = "https://..." } |
path | Fetched from local path | { path = "./lib" } |
Relationship with Manifest
yaoxiang.toml yaoxiang.lock
│ │
│ yaoxiang install │
├──────────────────────►│
│ │
│ Declare "http = *>" │ Lock "http = 1.0.0"
│ │yaoxiang.toml: Declares the desired dependencies (can use ranges)yaoxiang.lock: Records the actually installed versions (exact versions)
