bazel-ios / cocoapods-bazel

A Cocoapods plugin for automatically generating Bazel BUILD files
Apache License 2.0
110 stars 21 forks source link

NoMethodError ruby or cocoa pods #56

Open acidlynx opened 2 years ago

acidlynx commented 2 years ago

Hello! When I used this plugin, I get this error.

NoMethodError - undefined method `sub' for <Pod::Version version=0.2.7.6>:Pod::Version
/Users/user/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/bundler/gems/cocoapods-bazel-61eda975362f/lib/cocoapods/bazel/xcconfig_resolver.rb:11:in `block in resolved_build_setting_value'
thiagohmcruz commented 2 years ago

Hi @acidlynx this code path comes from here but it's really hard to guess what is going without a way to reproduce.

Would you be able to share a small project that reproduces the issue?

acidlynx commented 2 years ago

@thiagohmcruz Hello! I just made PR. Please review it. Thanks!

thiagohmcruz commented 2 years ago

@acidlynx that's awesome! Thx for the contribution!

Would you be able to share an example project that reproduces the issue or alternatively the .xcconfig that was being translated and somehow contained <Pod::Version version=0.2.7.6>:Pod::Version?

I still don't understand how the issue happened in the first place, it could be that the problem is somewhere else as I wouldn't expect this value coming from a xcconfig

acidlynx commented 2 years ago

@acidlynx that's awesome! Thx for the contribution!

Would you be able to share an example project that reproduces the issue or alternatively the .xcconfig that was being translated and somehow contained <Pod::Version version=0.2.7.6>:Pod::Version?

I still don't understand how the issue happened in the first place, it could be that the problem is somewhere else as I wouldn't expect this value coming from a xcconfig

Ok. I'll do it. It seems that some code cannot parse four-numbers versions (like 0.2.7.6 in my case). With three-numbers is ok.