orta / cocoapods-keys

A key value store for storing per-developer environment and application keys
MIT License
1.55k stars 93 forks source link

ZillyKeys.m doesn't compile with "Expected expression" error #203

Closed rogerluan closed 4 years ago

rogerluan commented 4 years ago

After adding gem rake to our Gemfile and upgrading fastlane from 2.150.0rc1 to 2.150.0, it stopped compiling when the key is an empty string "":

image

Removing the extra highlighted comma fixes the compilation issue.

It works fine if the key is not an empty string (but we require this empty string key in our current environment).

I know rake and fastlane are not directly related to this pod, but I'm just trying to provide more information that could help debugging this issue. There are other fastlane dependencies that were upgraded in release 2.150.0.

rogerluan commented 4 years ago

Looks like this could've regressed here: https://github.com/orta/cocoapods-keys/commit/a86bf86be65a8506b8c6213674cc2d6595792b2c#diff-0bfdc7ccbaf59e3c4e27c8b94440d2eaL39

There used to be a check on the key's length to be > 0, and it got removed.

Idk why it was working until the changes on fastlane/rake, though. Looks like I was using release v2.2.0, even though the last release published in GitHub was v2.1.0 🤔 the change above (done in March 2020) is only available in latest master (or v2.2.0).

Reverting from v2.2.0 to v2.1.0 fixes this issue.

So I specified gem 'cocoapods-keys', '2.1.0' in my Gemfile.

ashfurrow commented 4 years ago

I see, gotcha. We should add that check back in for zero-length key values. Can you send a PR? Note that #202 fixed some security-related issues, and I would highly highly recommend not to use the older version.

rogerluan commented 4 years ago

Looks like when I upgraded fastlane, I updated all my gems 😓 that was my bad.

Opening a PR @ashfurrow 👍