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.
[ ] 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.
Yeah this sounds reasonable! If we do want to include this under examples/ it shouldn't be too tricky to filter the example out of the build_all_examples Rust script.
Problems
Currently there are two problems:
master
branch for the standard library.Tasks
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.Forc.toml
and compares it against the savedForc.toml
. If they differ, fail.Forc.toml
in the book as linked above.forc init
to generate a more elaborate test harness than we have today. Specifically, it should include the most common imports, theabigen
, loading and deploying the contract fromout/debug/
, the wallet and provider, and the contract instance.forc test
with the default test harness.