Pin forc tool versions in docs workflow for ecosystem compatibility
Context
As part of the forc monorepo migration (RFC #49), we're moving forc tools from the sway repo to the forc repo.
The sway docs workflow (gh-pages.yml) installs these tools to generate documentation. Currently we install from main:
cargo install --locked --debug --git https://github.com/FuelLabs/forc forc-crypto
For tagged sway releases, this pulls whatever is on forc main at that moment, which may not be ideal for reproducibility.
Current State
For now, using main branch is acceptable because:
- The initial migrated tools (
forc-crypto,forc-wallet) don't directly depend on sway - The docs just show
--helpoutput which is relatively stable
Future Consideration
The forc repo tracks dependency versions in releases.toml, recording which versions of sway, fuel-core, fuels-rs each tool release was built against.
When we migrate more tools—especially those with compiler dependencies like forc-fmt (uses swayfmt) and forc-lsp (uses sway-lsp)—we should consider using releases.toml to pin tool versions in the docs workflow for better reproducibility and ecosystem consistency.
Related
- RFC: https://github.com/FuelLabs/sway-rfcs/pull/49
- forc-crypto migration PR: https://github.com/FuelLabs/forc/pull/119
- sway-side PR: https://github.com/FuelLabs/sway/pull/7507