Commit Graph

14 Commits

Author SHA1 Message Date
Paolo Tranquilli
065fecc57e Swift: extract precompiled swiftmodule files
Previously we were not extracting any `swiftmodule` file that was not
a system or a built-in one. This was done to avoid re-extracting
`swiftmodule` files that were built previously in the same build, but it
turned out to be too eager, as there are legitimate cases where a
non-system, non-built-in precompiled swift module can be used. An
example of that is the `PackageDescription` module used in Swift
Package Manager manifest files (`Package.swift`).

We now relax the test and trigger module extraction on all loaded
modules that do not have source files (we trigger source file extraction
for those). The catch, is that we also create empty trap files for
current output `swiftmodule` files (including possible alias locations
set up by XCode).

This means that if a following extractor run loads a previously built
`swiftmodule` file, although it will trigger module extraction, this
will however be skipped as it will find its target file already present
(this is done via the `TargetFile` semantics).
2022-07-29 11:10:03 +02:00
Paolo Tranquilli
d547a417c9 Swift: accept new test results 2022-07-28 12:57:12 +02:00
Paolo Tranquilli
ab1370cc8f Swift: add --no-cleanup to integration tests 2022-07-28 11:19:45 +02:00
Paolo Tranquilli
8addc06799 Swift: add integration test for multiple modules 2022-07-01 15:59:36 +02:00
Paolo Tranquilli
901e066355 Swift: locally run integration tests
Minimal recreations of internal `integration-tests-runner.py` and
`create_database_utils.py` are provided to be able to run the
integration tests on the codeql repository with a released codeql CLI.

For the moment we skip the database checks by default, as we are still
producing inconsistent results.
2022-07-01 15:00:05 +02:00
Alex Denisov
57811a4efc Swift: add a test case showing module loading problem
Extractor fails to load separate modules that were built by another
version of an actual compiler.
2022-06-29 07:38:18 +02:00
Paolo Tranquilli
80ffd81b2c Merge pull request #9614 from github/alexdenisov/swift-extract-all-inputs-with-outputs
Swift: extract all output-producing source files, not only primary files
2022-06-24 12:23:36 +02:00
Paolo Tranquilli
7334b4e03a Swift: autopep8 all python files
Additionally set up a pre-commit hook and a CI check for that.
2022-06-23 17:13:56 +02:00
Alex Denisov
42dc6814f0 Swift: extract all output-producing source files, not only primary files 2022-06-20 14:06:54 +02:00
Alex Denisov
1c9a684ac6 Swift: Introduce SwiftExtractionMode 2022-06-15 09:25:01 +02:00
Alex Denisov
6d67ea267c Swift: add cross-referencing test 2022-06-15 08:44:38 +02:00
Alex Denisov
fa09078976 Swift: do not keep trap files for tests 2022-05-24 11:48:45 +02:00
Alex Denisov
8e8da66325 Swift: share .gitignore across all tests 2022-05-24 11:48:06 +02:00
Alex Denisov
528f6f73c5 Swift: add integration tests 2022-05-24 11:12:35 +02:00