Compare commits

...

10 Commits

Author SHA1 Message Date
Bartosz Polaczyk 75bef0baf6 Merge pull request #136 from polac24/20220517-fix-vendored-frameworks
Support Vendored frameworks in the CocoaPods development pod
2022-05-19 09:03:04 +02:00
Bartosz Polaczyk 03671e71b7 Support Vendored frameworks in the CocoaPods plugin 2022-05-17 19:46:15 +02:00
Bartosz Polaczyk 91505a59d2 Merge pull request #135 from polac24/fix-hybrid-incremental
Fix hybrid incremental performance
2022-05-16 09:43:46 +02:00
Bartosz Polaczyk 59c1d999b1 Always clean history when prebuilding 2022-05-15 20:04:27 +02:00
Bartosz Polaczyk ba58c1c21e Do not add marker dependency 2022-05-15 19:59:42 +02:00
Bartosz Polaczyk 96ce18bc31 Retrigger clang compilations when a target is switching between cache miss<->hit 2022-05-13 12:07:12 +02:00
Bartosz Polaczyk 30e49ef7bc Merge pull request #132 from zzzworm/master
Update gem_version.rb
2022-05-12 12:25:57 +02:00
zzzworm d46f09c6dd Update gem_version.rb
just update the gem version to fix pod install error when disable XCRemoteCache
2022-05-12 15:30:44 +08:00
Bartosz Polaczyk 2fdf6c39e2 Merge pull request #131 from zzzworm/master
fix pod install  error when disable cache
2022-05-12 06:48:03 +02:00
zhouchanghong 064b22a2d1 fix pod install error when disable cache 2022-05-11 17:45:26 +08:00
4 changed files with 19 additions and 15 deletions
@@ -78,6 +78,10 @@ public class XCPrebuild {
exit(0)
}
let compilationHistoryOrganizer = CompilationHistoryFileOrganizer(
context.compilationHistoryFile,
fileManager: fileManager
)
do {
let envFingerprint = try EnvironmentFingerprintGenerator(
configuration: config,
@@ -148,10 +152,6 @@ public class XCPrebuild {
algorithm: MD5Algorithm()
)
let organizer = ZipArtifactOrganizer(targetTempDir: context.targetTempDir, fileManager: fileManager)
let compilationHistoryOrganizer = CompilationHistoryFileOrganizer(
context.compilationHistoryFile,
fileManager: fileManager
)
let metaReader = JsonMetaReader(fileAccessor: fileManager)
var consumerPlugins: [ArtifactConsumerPrebuildPlugin] = []
@@ -189,7 +189,6 @@ public class XCPrebuild {
case .compatible(localDependencies: let dependencies):
// TODO: pass `allowedInputFiles` observed in the build time
try modeController.enable(allowedInputFiles: dependencies, dependencies: dependencies)
compilationHistoryOrganizer.reset()
}
} catch {
disableRemoteCache(
@@ -197,6 +196,7 @@ public class XCPrebuild {
errorMessage: "Prebuild step failed with error: \(error)"
)
}
compilationHistoryOrganizer.reset()
}
private func disableRemoteCache(modeController: PhaseCacheModeController, errorMessage: String?) {
-4
View File
@@ -63,7 +63,3 @@ To fully uninstall the plugin, call:
```bash
gem uninstall cocoapods-xcremotecache
```
## Limitations
* When `generate_multiple_pod_projects` mode is enabled, only first-party targets are cached by XCRemoteCache (all dependencies are compiled locally).
@@ -27,8 +27,9 @@ module CocoapodsXCRemoteCacheModifier
LLDB_INIT_COMMENT="#RemoteCacheCustomSourceMap"
LLDB_INIT_PATH = "#{ENV['HOME']}/.lldbinit"
FAT_ARCHIVE_NAME_INFIX = 'arm64-x86_64'
XCRC_COOCAPODS_ROOT_KEY = 'XCRC_COOCAPODS_ROOT'
# List of plugins' user properties that should be copied to .rcinfo
# List of plugins' user properties that should not be copied to .rcinfo
CUSTOM_CONFIGURATION_KEYS = [
'enabled',
'xcrc_location',
@@ -38,9 +39,7 @@ module CocoapodsXCRemoteCacheModifier
'check_build_configuration',
'check_platform',
'modify_lldb_init',
'prettify_meta_files',
'fake_src_root',
'disable_certificate_verification'
]
class XCRemoteCache
@@ -64,9 +63,14 @@ module CocoapodsXCRemoteCacheModifier
'exclude_targets' => [],
'prettify_meta_files' => false,
'fake_src_root' => "/#{'x' * 10 }",
'disable_certificate_verification' => false
'disable_certificate_verification' => false,
'custom_rewrite_envs' => []
}
@@configuration.merge! default_values.select { |k, v| !@@configuration.key?(k) }
# Always include XCRC_COOCAPODS_ROOT_KEY in custom_rewrite_envs
unless @@configuration['custom_rewrite_envs'].include?(XCRC_COOCAPODS_ROOT_KEY)
@@configuration['custom_rewrite_envs'] << XCRC_COOCAPODS_ROOT_KEY
end
end
def self.validate_configuration()
@@ -109,6 +113,8 @@ module CocoapodsXCRemoteCacheModifier
# @param final_target [String] name of target that should trigger marking
def self.enable_xcremotecache(target, repo_distance, xc_location, xc_cc_path, mode, exclude_build_configurations, final_target, fake_src_root)
srcroot_relative_xc_location = parent_dir(xc_location, repo_distance)
# location of the entrite CocoaPods project, relative to SRCROOT
srcroot_relative_project_location = parent_dir('', repo_distance)
target.build_configurations.each do |config|
# apply only for relevant Configurations
@@ -124,6 +130,7 @@ module CocoapodsXCRemoteCacheModifier
config.build_settings['XCREMOTE_CACHE_FAKE_SRCROOT'] = fake_src_root
config.build_settings['XCRC_PLATFORM_PREFERRED_ARCH'] = ["$(LINK_FILE_LIST_$(CURRENT_VARIANT)_$(PLATFORM_PREFERRED_ARCH):dir:standardizepath:file:default=arm64)"]
config.build_settings[XCRC_COOCAPODS_ROOT_KEY] = ["$SRCROOT/#{srcroot_relative_project_location}"]
debug_prefix_map_replacement = '$(SRCROOT' + ':dir:standardizepath' * repo_distance + ')'
add_cflags!(config.build_settings, '-fdebug-prefix-map', "#{debug_prefix_map_replacement}=$(XCREMOTE_CACHE_FAKE_SRCROOT)")
add_swiftflags!(config.build_settings, '-debug-prefix-map', "#{debug_prefix_map_replacement}=$(XCREMOTE_CACHE_FAKE_SRCROOT)")
@@ -204,6 +211,7 @@ module CocoapodsXCRemoteCacheModifier
# Remove Fake src root for ObjC & Swift
config.build_settings.delete('XCREMOTE_CACHE_FAKE_SRCROOT')
config.build_settings.delete('XCRC_PLATFORM_PREFERRED_ARCH')
config.build_settings.delete(XCRC_COOCAPODS_ROOT_KEY)
remove_cflags!(config.build_settings, '-fdebug-prefix-map')
remove_swiftflags!(config.build_settings, '-debug-prefix-map')
end
@@ -309,7 +317,7 @@ module CocoapodsXCRemoteCacheModifier
end
# Remove .lldbinit rewrite
save_lldbinit_rewrite(nil) unless !@@configuration['modify_lldb_init']
save_lldbinit_rewrite(nil,nil) unless !@@configuration['modify_lldb_init']
end
# Returns the content (array of lines) of the lldbinit with stripped XCRemoteCache rewrite
@@ -13,5 +13,5 @@
# limitations under the License.
module CocoapodsXcremotecache
VERSION = "0.0.10"
VERSION = "0.0.12"
end