FuelLabs/sway

Add CI job to generate default Forc manifest and compare against a saved version

Open

#1.136 aberto em 4 de abr. de 2022

Ver no GitHub
 (1 comment) (2 reactions) (0 assignees)Rust (5.421 forks)batch import
The Sway Bookcigood first issue

Métricas do repositório

Stars
 (61.702 stars)
Métricas de merge de PR
 (Mesclagem média 22h 6m) (16 fundiu PRs em 30d)

Description

Problems

Currently there are two problems:

  1. Examples that are built use a local path for the standard library in order to guarantee they don't break. This mean there are no examples that use the default Forc manifest that uses this repo's master branch for the standard library.
  2. Such an example is needed for the docs and potentially in other places. https://github.com/FuelLabs/sway/blob/a40472f2a67aa4907c29af0d079ab360c8892b4b/docs/src/introduction/forc_project.md?plain=1#L25

Tasks

  • Manually generate the default Forc.toml and save it to a directory. examples/ might not be a good directory for this since all examples are built as part of CI currently and modifying that job would be more work.
  • Add a CI job that generates the default Forc.toml and compares it against the saved Forc.toml. If they differ, fail.
  • Use this saved Forc.toml in the book as linked above.
  • Update forc init to generate a more elaborate test harness than we have today. Specifically, it should include the most common imports, the abigen, loading and deploying the contract from out/debug/, the wallet and provider, and the contract instance.
  • Manually generate the default test harness and save it to a directory.
  • Add a CI job that generates the default test harness and compares it against the save one.
  • Use this saved test harness in the book.
  • Add a CI that runs forc test with the default test harness.

Guia do colaborador