Provide guidance on deno.lock file management
Opened by swampadmin · 11/22/2024
Problem Statement
When swamp initializes a repository with extension models, a deno.lock file is generated in the project root. There is no guidance on whether this file should be:
- Checked into version control or added to
.gitignore - Located in the project root or scoped under
.swamp/like other swamp runtime artifacts
This creates uncertainty for users setting up swamp in their repos. The .gitignore entries added by swamp init cover .swamp/data/, .swamp/outputs/, .swamp/secrets/, etc., but say nothing about deno.lock.
Proposed Solution
Provide clear guidance on deno.lock management. Options to consider:
- If it should be committed: Document this in
swamp initoutput or in the generated.gitignorecomments (e.g.,# Keep deno.lock checked in for reproducible builds) - If it should be ignored: Add
deno.lockto the.gitignoreentries thatswamp initgenerates - If it should live under
.swamp/: Move the lockfile scope so it's generated inside.swamp/rather than polluting the project root, consistent with how other swamp artifacts are organized
Alternatives Considered
- Users could decide on their own, but this leads to inconsistency across teams and projects
- A note in swamp documentation would help, but inline guidance during
swamp initwould be more discoverable
Additional Context
The lockfile currently tracks JSR/npm dependencies used by extension models (e.g., @std/yaml, zod). For application repos (not libraries), committing the lockfile is generally recommended for reproducibility, but the root-level placement feels out of place when swamp otherwise keeps its artifacts under .swamp/.
Closed
No activity in this phase yet.
Sign in to post a ripple.