Closed jszumski closed 2 years ago
Prunes podspec patterns that don't match anything on disk. This is needed for Bazel builds with --incompatible_disallow_empty_glob enabled. Invalid patterns typically show up in 2 ways:
--incompatible_disallow_empty_glob
intentional **/* patterns that are generously expanded into **/*.{ext} for each supported extension. Example from GoogleDataTransport:
**/*
**/*.{ext}
s.source_files = ['GoogleDataTransport/GDTCORLibrary/**/*', 'GoogleDataTransport/GDTCCTLibrary/**/*']
turns into:
name = "GoogleDataTransport", srcs = glob([ "GoogleDataTransport/GDTCORLibrary/**/*.h", "GoogleDataTransport/GDTCORLibrary/**/*.hh", "GoogleDataTransport/GDTCORLibrary/**/*.m", "GoogleDataTransport/GDTCORLibrary/**/*.mm", "GoogleDataTransport/GDTCORLibrary/**/*.swift", "GoogleDataTransport/GDTCORLibrary/**/*.c", "GoogleDataTransport/GDTCORLibrary/**/*.cc", "GoogleDataTransport/GDTCORLibrary/**/*.cpp", "GoogleDataTransport/GDTCCTLibrary/**/*.h", "GoogleDataTransport/GDTCCTLibrary/**/*.hh", "GoogleDataTransport/GDTCCTLibrary/**/*.m", "GoogleDataTransport/GDTCCTLibrary/**/*.mm", "GoogleDataTransport/GDTCCTLibrary/**/*.swift", "GoogleDataTransport/GDTCCTLibrary/**/*.c", "GoogleDataTransport/GDTCCTLibrary/**/*.cc", "GoogleDataTransport/GDTCCTLibrary/**/*.cpp", ]),
after this change it would be:
name = "GoogleDataTransport", srcs = glob([ "GoogleDataTransport/GDTCORLibrary/**/*.h", "GoogleDataTransport/GDTCORLibrary/**/*.m", "GoogleDataTransport/GDTCCTLibrary/**/*.h", "GoogleDataTransport/GDTCCTLibrary/**/*.m", "GoogleDataTransport/GDTCCTLibrary/**/*.c", ]),
The existing test for GlobExpansion already included paths that intentionally didn't exist on disk so I only needed to update its "after" fixture.
Relies on https://github.com/bazel-ios/cocoapods-bazel/pull/79.
Prunes podspec patterns that don't match anything on disk. This is needed for Bazel builds with
--incompatible_disallow_empty_glob
enabled. Invalid patterns typically show up in 2 ways:intentional
**/*
patterns that are generously expanded into**/*.{ext}
for each supported extension. Example from GoogleDataTransport:turns into:
after this change it would be:
The existing test for GlobExpansion already included paths that intentionally didn't exist on disk so I only needed to update its "after" fixture.
Relies on https://github.com/bazel-ios/cocoapods-bazel/pull/79.