SIGN IN SIGN UP

Differentiate between resolve_buck failing due to bad buck version and failing from unexpected error (#2696)

Summary:
A missing dependency (or other unexpected error) in resolve_buck.py can cause the CMake build to fail. It needs to gracefully fall back to the previous behavior in this case.

bypass-github-export-checks
bypass-github-executorch-ci-checks

Pull Request resolved: https://github.com/pytorch/executorch/pull/2696

Test Plan:
Uninstalled zstd via pip uninstall zstd.
Ran cmake ... Confirmed output message contained warning on script failure and gracefully fell back to system buck2.
Repeated above with cmake -DBUCK2=buck2-et2. Confirmed script failure warning and successful build.
Reinstalled zstd via pip install zstd.

Reviewed By: lucylq

Differential Revision: D55391962

Pulled By: GregoryComer

fbshipit-source-id: 3711546fb222169a7da954a773e9c057303778ca
G
Gregory Comer committed
7149a9c813b0d4ecc823f460466368d3fb1eee55
Parent: f4b97b2
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 3/27/2024, 11:10:39 AM