@fadroma/ops/Build: use latest commit hash instead of HEAD in artifact name?
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
When building from working tree, using the format `artifact@latestcommit.wasm` instead of `artifact@HEAD.wasm` would prevent outdated commits from being cached.
Questions:
1. How to mark that a build contains uncommitted changes? One option is `artifact@latestcommit+wip.wasm`. But then the naming convention conflicts with #97, which would use the `+` sign for feature flags. What if someone has a crate with a feature flag called `wip`? We could do per-commit subdirs, but those would proliferate very quickly, especially considering the following:
2. If the commit hash changes but the contract code doesn't, we end up with 2 identical artifacts. Symlinking unchanged artifacts to their last changed version could resolve this. But then we have a proliferation of checksum files in Git - do we want/tolerate this? I think it's nice because it makes a map of commits to code hashes. But does that belong in Git? I think it does but ultimately the lots of small files look scary and are bad for performance. Maybe one big append-only checksum file which is never overwritten? In the format:
```
commithash1 codehash1 artifact1.wasm
commithash1 codehash3 artifact3.wasm
---
commithash2 codehash1 artifact1.wasm
commithash2 codehash2 artifact2.wasm
```
...etc
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.