Skip to content

[Dependency Scanning] Deprecate/Remove batch scanning capability #1735

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 1 commit into from
Nov 21, 2024
Merged
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
52 changes: 4 additions & 48 deletions Sources/CSwiftScan/include/swiftscan_header.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include <stddef.h>
#include <stdint.h>

#define SWIFTSCAN_VERSION_MAJOR 0
#define SWIFTSCAN_VERSION_MINOR 10
#define SWIFTSCAN_VERSION_MAJOR 1
#define SWIFTSCAN_VERSION_MINOR 0

//=== Public Scanner Data Types -------------------------------------------===//

Expand Down Expand Up @@ -66,18 +66,6 @@ typedef struct {
size_t count;
} swiftscan_link_library_set_t;

//=== Batch Scan Input Specification --------------------------------------===//

typedef struct swiftscan_batch_scan_entry_s *swiftscan_batch_scan_entry_t;
typedef struct {
swiftscan_batch_scan_entry_t *modules;
size_t count;
} swiftscan_batch_scan_input_t;
typedef struct {
swiftscan_dependency_graph_t *results;
size_t count;
} swiftscan_batch_scan_result_t;

//=== Scanner Invocation Specification ------------------------------------===//

typedef struct swiftscan_scan_invocation_s *swiftscan_scan_invocation_t;
Expand Down Expand Up @@ -198,28 +186,6 @@ typedef struct {
swiftscan_string_ref_t
(*swiftscan_clang_detail_get_module_cache_key)(swiftscan_module_details_t);

//=== Batch Scan Input Functions ------------------------------------------===//
swiftscan_batch_scan_input_t *
(*swiftscan_batch_scan_input_create)(void);
void
(*swiftscan_batch_scan_input_set_modules)(swiftscan_batch_scan_input_t *, int, swiftscan_batch_scan_entry_t *);

//=== Batch Scan Entry Functions ------------------------------------------===//
swiftscan_batch_scan_entry_t
(*swiftscan_batch_scan_entry_create)(void);
void
(*swiftscan_batch_scan_entry_set_module_name)(swiftscan_batch_scan_entry_t, const char *);
void
(*swiftscan_batch_scan_entry_set_arguments)(swiftscan_batch_scan_entry_t, const char *);
void
(*swiftscan_batch_scan_entry_set_is_swift)(swiftscan_batch_scan_entry_t, bool);
swiftscan_string_ref_t
(*swiftscan_batch_scan_entry_get_module_name)(swiftscan_batch_scan_entry_t);
swiftscan_string_ref_t
(*swiftscan_batch_scan_entry_get_arguments)(swiftscan_batch_scan_entry_t);
bool
(*swiftscan_batch_scan_entry_get_is_swift)(swiftscan_batch_scan_entry_t);

//=== Prescan Result Functions --------------------------------------------===//
swiftscan_string_set_t *
(*swiftscan_import_set_get_imports)(swiftscan_import_set_t);
Expand Down Expand Up @@ -249,14 +215,6 @@ typedef struct {
(*swiftscan_dependency_graph_dispose)(swiftscan_dependency_graph_t);
void
(*swiftscan_import_set_dispose)(swiftscan_import_set_t);
void
(*swiftscan_batch_scan_entry_dispose)(swiftscan_batch_scan_entry_t);
void
(*swiftscan_batch_scan_input_dispose)(swiftscan_batch_scan_input_t *);
void
(*swiftscan_batch_scan_result_dispose)(swiftscan_batch_scan_result_t *);
void
(*swiftscan_scan_invocation_dispose)(swiftscan_scan_invocation_t);

//=== Target Info Functions-------- ---------------------------------------===//
swiftscan_string_ref_t
Expand All @@ -274,10 +232,6 @@ typedef struct {
void (*swiftscan_scanner_dispose)(swiftscan_scanner_t);
swiftscan_dependency_graph_t
(*swiftscan_dependency_graph_create)(swiftscan_scanner_t, swiftscan_scan_invocation_t);
swiftscan_batch_scan_result_t *
(*swiftscan_batch_scan_result_create)(swiftscan_scanner_t,
swiftscan_batch_scan_input_t *,
swiftscan_scan_invocation_t);
swiftscan_import_set_t
(*swiftscan_import_set_create)(swiftscan_scanner_t, swiftscan_scan_invocation_t);

Expand All @@ -294,6 +248,8 @@ typedef struct {
(*swiftscan_diagnostic_get_source_location)(swiftscan_diagnostic_info_t);
void
(*swiftscan_diagnostics_set_dispose)(swiftscan_diagnostic_set_t*);
void
(*swiftscan_scan_invocation_dispose)(swiftscan_scan_invocation_t);

//=== Source Location -----------------------------------------------------===//
swiftscan_string_ref_t
Expand Down
1 change: 0 additions & 1 deletion Sources/SwiftDriver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors

add_library(SwiftDriver
"ExplicitModuleBuilds/ClangVersionedDependencyResolution.swift"
"ExplicitModuleBuilds/ExplicitDependencyBuildPlanner.swift"
"ExplicitModuleBuilds/ModuleDependencyScanning.swift"
"ExplicitModuleBuilds/SerializableModuleArtifacts.swift"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,6 @@ public class InterModuleDependencyOracle {
diagnostics: &diagnostics)
}

@_spi(Testing) public func getBatchDependencies(workingDirectory: AbsolutePath,
moduleAliases: [String: String]? = nil,
commandLine: [String],
batchInfos: [BatchScanModuleInfo],
diagnostics: inout [ScannerDiagnosticPayload])
throws -> [ModuleDependencyId: [InterModuleDependencyGraph]] {
precondition(hasScannerInstance)
return try swiftScanLibInstance!.batchScanDependencies(workingDirectory: workingDirectory,
moduleAliases: moduleAliases,
invocationCommand: commandLine,
batchInfos: batchInfos,
diagnostics: &diagnostics)
}

@_spi(Testing) public func getImports(workingDirectory: AbsolutePath,
moduleAliases: [String: String]? = nil,
commandLine: [String],
Expand Down
Loading