-
Notifications
You must be signed in to change notification settings - Fork 650
Add check_for_installed_private_headers_in_cmake_out #13485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
166 commits
Select commit
Hold shift + click to select a range
07adf1a
Update
swolchok bc3fd39
Update
swolchok 00ce927
Update
swolchok 6440d3d
Update
swolchok e62191a
Update
swolchok 630bdd0
Update
swolchok 098432f
Update
swolchok 773ff37
Update
swolchok 87513d8
Update
swolchok b61319b
Update
swolchok 4265c31
Update
swolchok 190bea8
Update
swolchok d4aaa36
Update
swolchok 15bc325
Update
swolchok 6b9b4cc
Update
swolchok ca4c14e
Update
swolchok 372da45
Update
swolchok de924fe
Update
swolchok a0e9eb9
Update
swolchok 4878a6b
Update
swolchok da6fd97
Update
swolchok ef00f3d
Update
swolchok e5edad6
Update
swolchok e9d552e
Update
swolchok 8ed9894
Update
swolchok 3f80407
Update
swolchok 8ee4ee4
Update
swolchok 4787a21
Update
swolchok 8016e33
Update
swolchok a947148
Update
swolchok e3ae7b5
Update
swolchok 827e9c5
Update
swolchok 46df5cc
Update
swolchok a826c40
Update
swolchok 6601683
Update
swolchok 7a8397f
Update
swolchok d282727
Update
swolchok 857bfa7
Update
swolchok f7c1205
Update
swolchok 4b35d1e
Update
swolchok fe6b9c7
Update
swolchok 6fe249c
Update
swolchok 741d8a9
Update
swolchok ff128f7
Update
swolchok f06ee2f
Update
swolchok a1b9a76
Update
swolchok 59355b9
Update
swolchok 3c522ee
Update
swolchok 9027194
Update
swolchok 95cfe7d
Update
swolchok cb0234b
Update
swolchok 0d53925
Update
swolchok 3b24ef4
Update
swolchok 5a920ed
Update
swolchok 056ee1d
Update
swolchok 9d8e434
Update
swolchok 3a2d555
Update
swolchok b8f2a5b
Update
swolchok 719b63d
Update
swolchok 19bab0b
Update
swolchok 4fde311
Update
swolchok f02844b
Update
swolchok 1b47bf0
Update
swolchok 61f045d
Update
swolchok 4eb72d3
Update
swolchok 9c7b3d1
Update
swolchok 25a26e2
Update
swolchok aafa130
Update
swolchok 8dc7ba0
Update
swolchok 8d9394f
Update
swolchok 71ef8af
Update
swolchok b52f223
Update
swolchok 8df2f1d
Update
swolchok 7f5cfd3
Update
swolchok 832f410
Update
swolchok 51478b5
Update
swolchok aa296c7
rebase
swolchok 6e2be2b
rebase
swolchok 4780849
rebase
swolchok 4184f07
Update
swolchok da62330
Update
swolchok 31f198c
Update
swolchok 4d2bfd2
Update
swolchok d4f9a6f
Update
swolchok 3ccf059
Update
swolchok c24a619
Update
swolchok 69ed8e0
Update
swolchok 850e288
Update
swolchok 9dbb212
Update
swolchok 91fb965
Update
swolchok 800800c
Update
swolchok 1ef7f54
Update
swolchok 3f4950a
Update
swolchok 9d94c80
Update
swolchok b5f879c
Update
swolchok a64229d
Update
swolchok 152662a
Update
swolchok 7f2ca6a
rebase atop revert to unbreak tests
swolchok 5f78cd5
rebase atop revert to unbreak tests
swolchok 6a89113
rebase atop revert to unbreak tests
swolchok 8ea58c0
rebase atop revert to unbreak tests
swolchok f95f277
rebase atop revert to unbreak tests
swolchok 0db46b1
rebase atop revert to unbreak tests
swolchok ea95ed2
rebase atop revert to unbreak tests
swolchok 80a974a
rebase atop revert to unbreak tests
swolchok 0bbfae4
rebase atop revert to unbreak tests
swolchok ce099c5
Update
swolchok 0f13c9f
Update
swolchok 04d167e
Update
swolchok 222a087
Update
swolchok e9c78ed
Update
swolchok f959b51
Update
swolchok 7d6c8c5
Update
swolchok 276f39f
Update
swolchok 97b2cdf
Update
swolchok 689fdc3
Update
swolchok ef3c565
Update
swolchok d412422
Update
swolchok 39c8753
Update
swolchok 9fef931
rebase
swolchok 878efc6
rebase
swolchok 4473fb7
rebase
swolchok 475ba13
rebase
swolchok b8ad6be
rebase
swolchok f6126e4
rebase
swolchok 79bffad
rebase
swolchok e1db7c8
rebase
swolchok 6278fa1
rebase
swolchok 90bb993
rebase
swolchok a911797
rebase
swolchok 6a12c42
rebase
swolchok 3c90a4e
rebase
swolchok 97ac217
rebase
swolchok 0197f62
rebase
swolchok a3b4074
rebase
swolchok dec04ee
rebase
swolchok fbfa1ac
rebase
swolchok 74c24fe
rebase
swolchok a774eaa
rebase
swolchok 8faeaca
rebase
swolchok 863a443
rebase
swolchok 854f3ca
rebase
swolchok 5304064
rebase
swolchok c054311
rebase
swolchok 9e5ecf7
rebase
swolchok 796338d
rebase
swolchok 80bc1ed
rebase
swolchok 0c4dd67
rebase
swolchok 2344953
rebase
swolchok 49afd80
Update
swolchok ad8f94e
Update
swolchok 001ec28
Update
swolchok 0515435
Update
swolchok 9f16519
Update
swolchok 158d573
Update
swolchok 7b97a9f
Update
swolchok 0114056
Update
swolchok 2c92cba
rebase to pacify GitHub again
swolchok 5c0be95
rebase to pacify GitHub again
swolchok 3270089
rebase to pacify GitHub again
swolchok 59e942d
rebase to pacify GitHub again
swolchok 1e6caff
rebase to pacify GitHub again
swolchok 7a6747f
Update
swolchok bd7694b
Update
swolchok 7e4be82
Update
swolchok 2df8439
Update
swolchok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
# This script verifies that all headers that are installed under | ||
# cmake-out/include/executorch are exported_headers of some Buck | ||
# target. (It does *not* verify the reverse, namely that all | ||
# exported_headers of every Buck target that should have been built | ||
# when that directory was installed are actually installed.) | ||
# | ||
# Ideally, "some Buck target" would include any target in the whole | ||
# repo, but we cannot yet buck query the whole repo. (See | ||
# .ci/scripts/unittest-buck2.sh.) Instead, we query a manually-curated | ||
# list of targets. | ||
|
||
set -euxo pipefail | ||
|
||
BUCK_HEADERS_TEMPFILE=$(mktemp /tmp/check_private_headers_buck.txt.XXXXXX) | ||
ACTUAL_HEADERS_TEMPFILE=$(mktemp /tmp/check_private_headers_installed.txt.XXXXXX) | ||
SOURCE_ROOT_DIR=$(git rev-parse --show-toplevel) | ||
BUCK2=$(python3 "${SOURCE_ROOT_DIR}/tools/cmake/resolve_buck.py" --cache_dir="${SOURCE_ROOT_DIR}/buck2-bin") | ||
if [[ "$BUCK2" == "buck2" ]]; then | ||
BUCK2=$(command -v buck2) | ||
fi | ||
|
||
"${SOURCE_ROOT_DIR}/scripts/print_exported_headers.py" \ | ||
--buck2=$(realpath "$BUCK2") --targets \ | ||
//extension/data_loader: //extension/evalue_util: \ | ||
//extension/flat_tensor: //extension/llm/runner: //extension/kernel_util: //extension/module: \ | ||
//extension/runner_util: //extension/tensor: //extension/threadpool: \ | ||
| sort > "${BUCK_HEADERS_TEMPFILE}" | ||
find "${SOURCE_ROOT_DIR}/cmake-out/include/executorch" -name '*.h' | \ | ||
sed -e "s|${SOURCE_ROOT_DIR}/cmake-out/include/executorch/||" | \ | ||
# Don't complain about generated Functions.h \ | ||
grep -E -v 'Functions.h$' | sort > "${ACTUAL_HEADERS_TEMPFILE}" | ||
ACTUAL_HEADERS_NOT_EXPORTED_IN_BUCK=$(comm -13 "${BUCK_HEADERS_TEMPFILE}" "${ACTUAL_HEADERS_TEMPFILE}") | ||
if [[ -n "${ACTUAL_HEADERS_NOT_EXPORTED_IN_BUCK}" ]]; then | ||
>&2 echo "The following non-exported headers were installed: | ||
${ACTUAL_HEADERS_NOT_EXPORTED_IN_BUCK}" | ||
exit 1 | ||
fi |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to follow up with Greg on what this even is used for.