You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Fixing #7243
As titled. This PR adds 2 things:
1. `check_and_update_submodule()` check if required submodule folders exist and at least contains a CMakeLists.txt file.
2. Give useful error when the submodule is corrupted (most likely missing a file, caused by submodule out of sync).
Test Plan:
1. Test if we can still install, if submodule is not updated
```
rm -rf third-party/prelude
./install_executorch.sh
```
See the following log
```
...
Processing /data/users/larryliu/executorch
Preparing metadata (pyproject.toml): started
Running command Preparing metadata (pyproject.toml)
2025-02-05 11:28:46,430 [ExecuTorch] WARNING: Some required submodules are missing. Updating submodules...
Submodule path 'third-party/prelude': checked out '851d3f09c452937fc5adef27e2c50f7f304f1646'
2025-02-05 11:28:46,748 [ExecuTorch] INFO: All required submodules are present.
2025-02-05 11:28:47,018 [ExecuTorch] INFO: running dist_info
...
```
This proves that we can update submodule for the user.
2. Test if we can give useful error message, if we are missing a file.
```
rm third-party/gflags/src/gflags.cc
./install_executorch.sh --clean
./install_executorch.sh
```
See the following error:
```
2025-02-05 12:08:56,889 [ExecuTorch] ERROR: Failed to query buck for sources. Failed command:
buck2 cquery inputs(deps('//runtime/executor:program'))
This is likely due to missing git submodules or outdated CMake cache. Please run the following before retry:
./install_executorch.sh --clean
git submodule update --init --recursive
```
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: [D69156975](https://our.internmc.facebook.com/intern/diff/D69156975)
[ghstack-poisoned]
0 commit comments