Description
The workspace dependencies include external crates fetched from git without specifying branch, tag, or rev constraints: mohu-compute and mohu-linalg. This means each build may fetch different commits from the default branch, causing non-deterministic builds and dependency conflicts. Without version pinning, the project cannot guarantee reproducible builds or consistent behavior across different build environments.
Steps to Reproduce
- Run 'cargo build' on main branch
- Observe that mohu-compute and mohu-linalg are fetched from git
- Wait for commits to be merged in those repositories
- Run 'cargo build' again
- Different commits may be fetched, causing non-deterministic builds
Environment Information
- mohu (Rust library)
- Affected file: Cargo.toml, lines 73-74
- External dependencies: mohu-compute, mohu-linalg from GitHub
- No version pinning specified
Expected Behavior
Git dependencies should specify explicit commits (rev=) or tags to ensure reproducible builds. Alternatively, crates should be published to crates.io and version-pinned via version constraints.
Actual Behavior
Lines 73-74 specify git repositories without branch, tag, or rev constraints. Cargo will fetch the default branch (main/master) which changes over time.
Code Reference
File: Cargo.toml
Lines: 73-74
Problematic code: mohu-compute = { git = 'https://github.com/mohu-org/mohu-compute' }
mohu-linalg = { git = 'https://github.com/mohu-org/mohu-linalg' }
Additional Context
Severity: Medium. Non-deterministic builds can hide bugs, cause CI/CD failures, and make debugging difficult. Suggested fix: Pin to specific commits or tags: { git = 'https://...', rev = 'abc123...' } or publish to crates.io.
Suggested Labels
build, dependency-management, reproducibility
Program Template
Description
The workspace dependencies include external crates fetched from git without specifying branch, tag, or rev constraints: mohu-compute and mohu-linalg. This means each build may fetch different commits from the default branch, causing non-deterministic builds and dependency conflicts. Without version pinning, the project cannot guarantee reproducible builds or consistent behavior across different build environments.
Steps to Reproduce
Environment Information
Expected Behavior
Git dependencies should specify explicit commits (rev=) or tags to ensure reproducible builds. Alternatively, crates should be published to crates.io and version-pinned via version constraints.
Actual Behavior
Lines 73-74 specify git repositories without branch, tag, or rev constraints. Cargo will fetch the default branch (main/master) which changes over time.
Code Reference
File: Cargo.toml
Lines: 73-74
Problematic code: mohu-compute = { git = 'https://github.com/mohu-org/mohu-compute' }
mohu-linalg = { git = 'https://github.com/mohu-org/mohu-linalg' }
Additional Context
Severity: Medium. Non-deterministic builds can hide bugs, cause CI/CD failures, and make debugging difficult. Suggested fix: Pin to specific commits or tags: { git = 'https://...', rev = 'abc123...' } or publish to crates.io.
Suggested Labels
build, dependency-management, reproducibility
Program Template