Change integration-tests/build.rs to fetch OZ submodule automatically.
Type of change
[X] Bug fix (non-breaking change which fixes an issue)
Rationale
I propose to change integration-tests/build.rs to automatically fetch OZ contracts submodule, so that initial rust-analyzer indexation works without errors. Right now it's necessary to fetch the submodule manually or by running integration-tests/run.sh.
How Has This Been Tested?
This feature is hard to test neither with unit-tests nor with integration-tests, so it was tested locally, on a new & clean repo and worked without any errors.
Open question
A completed spawned process returns its exit-status/code, so possibly it's a good tone to check if it's successful (exit code = 0); though the command is clear and straightforward - that's why I decided not to do that.
PR code explanation
This PR contains:
Adding new error kind to BuildError enum:
/// Failed to pull OZ submodule from github
#[error("FailedToPullSubmodule({0:})")]
FailedToPullSubmodule(String),
Description
Change integration-tests/build.rs to fetch OZ submodule automatically.
Type of change
Rationale
I propose to change integration-tests/build.rs to automatically fetch OZ contracts submodule, so that initial rust-analyzer indexation works without errors. Right now it's necessary to fetch the submodule manually or by running integration-tests/run.sh.
How Has This Been Tested?
This feature is hard to test neither with unit-tests nor with integration-tests, so it was tested locally, on a new & clean repo and worked without any errors.
Open question
A completed spawned process returns its
exit-status
/code, so possibly it's a good tone to check if it's successful (exit code = 0); though the command is clear and straightforward - that's why I decided not to do that.PR code explanation
This PR contains:
BuildError
enum: