thii / rules_swiftlint

Run SwiftLint in your Bazel build efficiently.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: Confliction actions for files with same name

andre-alves opened this issue · comments

commented

Validation fails when modules have files with the same name:

bazelisk build //BazelSample:BuildTest
ERROR: file 'BazelSample/Something.swift.validation' is generated by these conflicting actions:
Label: //BazelSample:CocktailDBInterface, //BazelSample:NetworkInterface
Aspects: [@com_github_thii_rules_swiftlint//swiftlint/private:aspects.bzl%swiftlint_aspect]
RuleClass: swift_library rule
JavaActionClass: class com.google.devtools.build.lib.analysis.actions.StarlarkAction
Configuration: a6fee4f05da9434dc8822a8a1df8666b42153fdc0f0c13f71cf37f456e8d26c2
Mnemonic: SwiftLint
Action key: 4272cb2a00dc5a5c7d56172ab11851c91941e40f7b5ea66a9a61547db49e6e0e, ecd1db0710ba7f91997b29b605f18b9ece4310e2b2f59bd0d23960ed734d44b4
Progress message: Linting 'BazelSample/CocktailDBInterface/Sources/Something.swift', Linting 'BazelSample/NetworkInterface/Sources/Something.swift'
Action describeKey: Linting 'BazelSample/CocktailDBInterface/Sources/Something.swift'
  Environment variables taken from the client environment: LD_LIBRARY_PATH
  Environment variables taken from the client environment: PATH
  Argument: bazel-out/darwin_arm64-opt-exec-2B5CBBC6-ST-521287fc850f/bin/external/com_github_thii_rules_swiftlint/tools/swiftlint_wrapper
  Argument: external/SwiftLint/swiftlint
  Argument: bazel-out/ios-sim_arm64-min14.0-applebin_ios-ios_sim_arm64-fastbuild-ST-b50dc75d2840/bin/BazelSample/Something.swift.validation
  Argument: lint
  Argument: --config
  Argument: external/com_github_thii_rules_swiftlint/swiftlint/default.swiftlint.yml
  Argument: --no-cache
  Argument: --quiet
  Argument: BazelSample/CocktailDBInterface/Sources/Something.swift
, Linting 'BazelSample/NetworkInterface/Sources/Something.swift'
  Environment variables taken from the client environment: LD_LIBRARY_PATH
  Environment variables taken from the client environment: PATH
  Argument: bazel-out/darwin_arm64-opt-exec-2B5CBBC6-ST-521287fc850f/bin/external/com_github_thii_rules_swiftlint/tools/swiftlint_wrapper
  Argument: external/SwiftLint/swiftlint
  Argument: bazel-out/ios-sim_arm64-min14.0-applebin_ios-ios_sim_arm64-fastbuild-ST-b50dc75d2840/bin/BazelSample/Something.swift.validation
  Argument: lint
  Argument: --config
  Argument: external/com_github_thii_rules_swiftlint/swiftlint/default.swiftlint.yml
  Argument: --no-cache
  Argument: --quiet
  Argument: BazelSample/NetworkInterface/Sources/Something.swift

PrimaryInput: File:[/Users/andre.alves/Documents/Works/swiftlint-sample-bug[source]]BazelSample/CocktailDBInterface/Sources/Something.swift, File:[/Users/andre.alves/Documents/Works/swiftlint-sample-bug[source]]BazelSample/NetworkInterface/Sources/Something.swift
PrimaryOutput: File:[[<execution_root>]bazel-out/ios-sim_arm64-min14.0-applebin_ios-ios_sim_arm64-fastbuild-ST-b50dc75d2840/bin]BazelSample/Something.swift.validation
ERROR: com.google.devtools.build.lib.actions.MutableActionGraph$ActionConflictException: for BazelSample/Something.swift.validation, previous action: action 'Linting 'BazelSample/NetworkInterface/Sources/Something.swift'', attempted action: action 'Linting 'BazelSample/CocktailDBInterface/Sources/Something.swift''

INFO: Elapsed time: 0.053s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

Sample:

rules_swiftlint_conflict_bug.zip

This has been fixed in 0.4.0. Can you try again?

commented

Yep, it's working fine in my setup now.

Thanks for the fast fixes.