Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions swift/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ pkg_runfiles(
prefix = "tools/" + codeql_platform,
)

pkg_filegroup(
name = "resource-dir-arch",
srcs = ["//swift/third_party/swift-llvm-support:swift-resource-dir"],
prefix = "resource-dir/" + codeql_platform,
visibility = ["//visibility:public"],
)

pkg_files(
name = "swift-test-sdk-arch",
srcs = ["//swift/third_party/swift-llvm-support:swift-test-sdk"],
Expand All @@ -76,6 +83,7 @@ pkg_filegroup(
srcs = [
":extractor",
":swift-test-sdk-arch",
":resource-dir-arch",
] + select({
"@platforms//os:linux": [
":incompatible-os",
Expand Down
8 changes: 4 additions & 4 deletions swift/actions/build-and-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ runs:
mkdir -p bazel-cache/{repository,disk}
echo build --repository_cache=bazel-cache/repository --disk_cache=bazel-cache/disk > local.bazelrc
echo test --test_output=errors >> local.bazelrc
- name: Print unextracted entities
shell: bash
run: |
bazel run //swift/extractor/print_unextracted
# - name: Print unextracted entities
# shell: bash
# run: |
# bazel run //swift/extractor/print_unextracted
- uses: ./swift/actions/share-extractor-pack
- name: Build Swift extractor
shell: bash
Expand Down
10 changes: 2 additions & 8 deletions swift/actions/run-integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@ runs:
using: composite
steps:
- uses: ./swift/actions/share-extractor-pack
- name: Get Swift version
id: get_swift_version
shell: bash
run: |
VERSION=$(swift/extractor-pack/tools/*/extractor --version | awk '/version/ { print $3 }')
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
- uses: actions/setup-python@v4
with:
python-version-file: 'swift/.python-version'
- uses: swift-actions/setup-swift@da0e3e04b5e3e15dbc3861bd835ad9f0afe56296
- uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf
with:
swift-version: "${{steps.get_swift_version.outputs.version}}"
swift-version: "5.8"
- uses: ./.github/actions/fetch-codeql
- id: query-cache
uses: ./.github/actions/cache-query-compilation
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
class Element extends @element {
string toString() { none() }
}

newtype TAddedUnspecifiedElement =
TNonExplicitClosureExprClosureBody(Element list, Element body) {
capture_list_exprs(list, body) and not explicit_closure_exprs(body)
}

module Fresh = QlBuiltins::NewEntity<TAddedUnspecifiedElement>;

class TNewElement = @element or Fresh::EntityId;

class NewElement extends TNewElement {
string toString() { none() }
}

query predicate new_unspecified_elements(NewElement u, string property, string error) {
unspecified_elements(u, property, error)
or
u = Fresh::map(TNonExplicitClosureExprClosureBody(_, _)) and
property = "closure_body" and
error = "while downgrading: closure_body not an @explicit_closure_expr"
}

query predicate new_unspecified_element_parents(NewElement u, Element parent) {
unspecified_element_parents(u, parent)
or
u = Fresh::map(TNonExplicitClosureExprClosureBody(parent, _))
}

query predicate new_capture_list_exprs(Element list, NewElement body) {
capture_list_exprs(list, body) and explicit_closure_exprs(body)
or
body = Fresh::map(TNonExplicitClosureExprClosureBody(list, _))
}
Loading