Skip to content

Releases: lengain/cocoapods-podgenerate

v0.1.12

17 Jun 15:19

Choose a tag to compare

v0.1.12 (2025-06-17)

Bug Fixes

  • Xcode 动态刷新修复: 此前增量安装时 Pods 项目的 project.pbxproj 文件修改时间未更新(SHA256 相同则跳过保存、跳过路径完全不生成),Xcode 无法检测到变化,不会触发 Dynamic Project Reloading(项目树不刷新)。现在:
    • project_writer_patch.rb: 即使内容未变也 touch pbxproj 文件更新时间戳
    • installer_patch.rb 跳过路径: 直接 touch 磁盘上已有的 Pods/project.pbxproj

v0.1.11

16 Jun 14:53

Choose a tag to compare

v0.1.11 (2025-06-15)

Bug Fixes

  • nil 保护: 当 pod_project_generation_result.project 返回 nil 时(某些 CocoaPods 配置/版本),installer.pods_project.targets 在 post-install hook 中会崩溃(undefined method 'targets' for nil)。现在创建空 Pod::Project.new(sandbox.project_path) 作为降级,防止崩溃。

New Tests

  • example/run_nil_pods_project_test.rb — nil pods_project 修复验证测试

v0.1.10

15 Jun 15:50

Choose a tag to compare

v0.1.10 (2025-06-15)

Improvements

  • 添加调试日志: resolve_cross_project_dependencies 守卫条件增加日志输出,便于诊断跨项目依赖解析是否被正确触发。
  • 统一 Flutter 测试: example/run_flutter_test.rb 合并 Mode A(内联 depends_on_flutter)和 Mode B(load podhelper.rb 官方集成模式),支持 --a/--b/--all 参数。

Bug Fixes

  • flutter_post_install 在测试 podhelper.rb 中增加完成消息输出,便于测试验证。

v0.1.9

15 Jun 15:27

Choose a tag to compare

v0.1.9 (2025-06-15)

Bug Fixes

  • 扩展跨项目依赖解析 (F1v2): resolve_cross_project_dependencies 现在覆盖 ALL projects in @generated_projects,不仅限于主 Pods 项目。Flutter 新版 podhelper.rb 在 post-install hook 中同时遍历 pods_project.targetsgenerated_projects...targets,子项目 target 的跨项目 PBXTargetDependency 也需要解析。

New Features

  • Flutter 模拟测试: example/run_flutter_test.rb — 创建 Flutter 引擎 pod,10 个 pod 依赖 Flutter,精确复现 Flutter podhelper.rb 的 depends_on_flutter 递归函数,验证跨项目依赖遍历正确工作。

  • 复杂 Podfile 兼容性测试: example/complex_podfile_test.rb + example/run_complex_test.rb — 测试 abstract_target, inherit!, test_specs, vendored_frameworks, script_phases, subspec, module_map 等复杂 Podfile 模式。

v0.1.8

15 Jun 14:57

Choose a tag to compare

v0.1.8 (2025-06-15)

Bug Fixes

  • Flutter podhelper.rb 兼容性修复 (F1): 解决 generate_multiple_pod_projects 启用后,Flutter 的 depends_on_flutter 递归遍历 dependency.target 时遇到跨项目 Xcodeproj 引用返回 nil 导致的崩溃问题(undefined method 'dependencies' for nil)。新增 resolve_cross_project_dependencies 方法,在 post-install hooks 执行前将子项目 target 挂载到主项目的 PBXTargetDependency.target 上。

  • 跳过路径 nil 保护 (F2): 在无变更跳过路径中,用 Pod::Project.new(path) 替代 @pods_project = nil,防止 post-install hooks 访问 installer.pods_project.targets 时崩溃。

v0.1.7

14 Jun 03:16

Choose a tag to compare

v0.1.7 - Concurrency Bug Fixes

Bug Fixes from Code Review

1. parallel_cleanup_projects — rescue on wrong scope (project_writer_patch.rb)

  • The rescue StandardError was attached to the each block, not inside pool.post
  • Thread exceptions were silently swallowed by Concurrent::FixedThreadPool
  • Fix: moved rescue inside the pool.post do...end block

2. parallel_recreate_user_schemes — same structural bug (project_writer_patch.rb)

  • Identical pattern: rescue on each instead of inside pool.post
  • Fix: moved rescue inside the pool.post do...end block

3. integrate_user_targets — thread exception propagation (user_integrator_patch.rb)

  • Thread.new with no error handling; threads.each(&:join) raises on first failure
  • Remaining threads become orphaned, potentially leaving xcodeproj in inconsistent state
  • Fix: added rescue StandardError inside each Thread.new block with warning

4. save_cached_result — inconsistent indentation (analyzer_patch.rb)

  • Data hash construction at wrong indent level suggesting incorrect control flow
  • Fix: aligned to correct indentation inside begin block

Full changelog: commits

v0.1.6

13 Jun 14:57

Choose a tag to compare

v0.1.6 - CocoaPods 1.16.2 Compatibility Fix

Bug Fix

  • Fixed NoMethodError - undefined method 'version' for Pod::Resolver::ResolverSpecification when running with CocoaPods 1.16.2
  • Added respond_to? guards in save_cached_result before accessing version and root on specification objects
  • ResolverSpecification in CocoaPods 1.16.2 no longer exposes a direct #version method; version is accessed via wrapped .spec.version

Notes

  • Source code already had the fix in v0.1.4, but the released gem file was built from an earlier revision. v0.1.6 ensures the fix is properly published.

v0.1.4 — 全面 Bug 修复 + 中文注释

13 Jun 14:08

Choose a tag to compare

v0.1.4 — 全面 Bug 修复 + 中文注释

3 个并行代理深度扫描 13 个源文件,交叉对照 CocoaPods 1.16.2 源码,发现并修复 18 个 bug。

CRITICAL 修复 (2)

  • C1 : 解析缓存完全失效(从不存 result)→ 重写缓存机制,现在真正跳过 Molinillo
  • C2 : 快速跳过路径未设置 ivars + 跳过 post-install hooks → 已修复

HIGH 修复 (5)

  • H1 : 跳过路径传入空结果清除 metadata_cache → 已修复
  • H2 : 同 project 多 target 并行导致 Xcodeproj 竞态条件 → 按 project 分组
  • H3 : 重复 prepend 导致祖先链混乱 → @activated 守卫
  • H4 : --debug flag 永久失效 → 移除 ||= 缓存
  • H5 : 缓存键用 to_s 含内存地址 → 改为 to_yaml

MEDIUM 修复 (7)

  • M1: 全部 6 个线程池站点添加 120s 超时
  • M2: 并行安装错误不再静默吞掉
  • M3: integrate_targets 改用线程池限制并发数
  • M4: TracePoint 添加 500 次安全阀
  • M5: hooks.rb 不再为死代码
  • M6: thread_pool.rb 替换为共享工具模块
  • M7: command.rb 正确传递用户参数

LOW 修复 (4)

  • L1: nil==nil 摘要比对已修正
  • L2: 移除死代码 || []
  • L3: rescue 范围缩小
  • L4: profiler 时间数组加 mutex

中文注释

所有 6 个 patch 文件 + 入口 + profiler + 工具类均有详细中文注释。

安装

gem update cocoapods-podgenerate

v0.1.3 — Bug fixes from audit

13 Jun 13:53

Choose a tag to compare

v0.1.3 — Bug Fixes from Audit

Thorough line-by-line audit of all 6 patches against CocoaPods 1.16.2 source.

Fixed

Bug 1 [CRITICAL]cache_analyzer_patch.rb: nil entries in results hash
Thread failure during cache key computation left results[label] = nil, which would crash
ProjectCacheAnalyzer#analyze with NoMethodError on nil when calling key_difference.
→ Extract compute_cache_key helper; retry synchronously on error to guarantee valid result.

Bug 2 [MEDIUM]project_writer_patch.rb: overly broad rescue in parallel_cleanup_projects
Entire method body wrapped in rescue NameError, obscuring potential issues.
→ Narrow rescue to Concurrent::FixedThreadPool.new only.

Bug 3 [LOW]project_writer_patch.rb: same pattern in parallel_recreate_user_schemes
→ Same fix; extract recreate_schemes_for_project helper to DRY fallback logic.

Bug 4 [LOW]user_integrator_patch.rb: undocumented private method access
→ Added comment confirming Ruby allows implicit-receiver private method calls from prepended modules.

Verified

  • 5 patches confirmed bug-free (method signatures, thread safety, constant resolution, super chain)
  • Clean install: no crashes, no performance regression
  • Incremental install: 1.00s (same as v0.1.2)

Installation

gem update cocoapods-podgenerate

v0.1.2 — Deep parallelization of step 3 & 4

13 Jun 13:44

Choose a tag to compare

v0.1.2 — Deep Parallelization of Step 3 & 4

Performance

Scenario v0.1.1 v0.1.2 Improvement
Clean install 5.61s 5.18s +7.7%
Incremental 1.52s 1.14s +25%

What's New

  • Parallel PodTargetInstaller — 150 pod projects install simultaneously via thread pool
  • Parallel cache key computation — MD5 checksums computed across all pod targets in parallel
  • Parallel configure_schemes — scheme files configured across projects concurrently
  • Parallel cleanup + recreate_user_schemes — project cleanup and scheme recreation now multithreaded
  • Parallel xcconfig override warnings — multi-target config checking parallelized
  • Sub-step profiler timing — see detailed breakdown (Create and save projects, Write lockfiles, etc.)

New Files

  • patches/multi_project_generator_patch.rb — parallel PodTargetInstaller
  • patches/cache_analyzer_patch.rb — parallel cache key computation

Installation

gem update cocoapods-podgenerate