Skip to content

Commit

Permalink
Remove Copy Bazel Outputs scripts from non-product targets (#1238)
Browse files Browse the repository at this point in the history
The idea about keeping them around was that we would use them for
copying diagnostics and then modifying a file to force a "recompile".
There are other ways to achieve that though, so these scripts are just
plain overhead right now.
  • Loading branch information
brentleyjones authored Oct 7, 2022
1 parent 50a3b59 commit 5f8c7df
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 243 deletions.
68 changes: 0 additions & 68 deletions examples/integration/test/fixtures/bwb.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

102 changes: 0 additions & 102 deletions test/fixtures/generator/bwb.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/generator/src/Generator/AddTargets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ private extension ConsolidatedTargetOutputs {
productBasename: String,
filePathResolver: FilePathResolver
) throws -> String? {
guard hasOutputs else {
guard hasProductOutput else {
return nil
}

Expand Down
8 changes: 4 additions & 4 deletions tools/generator/src/Generator/ConsolidateTargets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,13 @@ struct ConsolidatedTarget: Equatable {
let isSwift: Bool
let inputs: ConsolidatedTargetInputs
let linkerInputs: ConsolidatedTargetLinkerInputs
let hasLinkerFlags: Bool
let resourceBundleDependencies: Set<TargetID>
let watchApplication: TargetID?
let extensions: Set<TargetID>
let appClips: Set<TargetID>
let outputs: ConsolidatedTargetOutputs

let hasLinkerFlags: Bool

/// The `Set` of `FilePath`s that each target references above the baseline.
///
/// The baseline is all `FilePath`s that each target references. A reference
Expand Down Expand Up @@ -344,6 +343,7 @@ extension ConsolidatedTarget {
.map { $1 }
inputs = Self.consolidateInputs(targets: sortedTargets)
linkerInputs = Self.consolidateLinkerInputs(targets: sortedTargets)
hasLinkerFlags = aTarget.hasLinkerFlags

var baselineFiles: Set<FilePath> = aTarget
.allExcludableFiles(xcodeGeneratedFiles: xcodeGeneratedFiles)
Expand Down Expand Up @@ -371,11 +371,10 @@ extension ConsolidatedTarget {
allDependencies = aTarget.allDependencies
outputs = ConsolidatedTargetOutputs(
hasOutputs: self.targets.values.contains { $0.outputs.hasOutputs },
hasProductOutput: self.targets.values.contains { $0.outputs.hasProductOutput },
hasSwiftOutputs: self.targets.values
.contains { $0.outputs.hasSwiftOutputs }
)

hasLinkerFlags = aTarget.hasLinkerFlags
}

private static func consolidateInputs(
Expand Down Expand Up @@ -484,6 +483,7 @@ struct ConsolidatedTargetLinkerInputs: Equatable {

struct ConsolidatedTargetOutputs: Equatable {
let hasOutputs: Bool
let hasProductOutput: Bool
let hasSwiftOutputs: Bool
}

Expand Down
Loading

0 comments on commit 5f8c7df

Please sign in to comment.