Skip to content

Conversation

@sunmou99
Copy link
Contributor

Update integration testapps' Podfiles to match the SDK's Podfile.

Script reference: https://github.com/firebase/firebase-ios-sdk/blob/master/scripts/localize_podfile.swift

@anonymous-akorn
Copy link
Contributor

anonymous-akorn commented Oct 20, 2020

I'm curious about the choice to use swift for this script. It looks like the logic in the script boils down to this:

  • Read a file.
  • Look for lines of the form pod '<api>', '<version>' and store a mapping of api -> version.
  • Read another file.
  • Look for lines of the same form, and replace their version with the version in the mapping.

Given that we're defaulting to Python for our scripts, would it make sense to write this logic in Python instead? Or is there a benefit to leaving it in swift?

@sunmou99
Copy link
Contributor Author

Given that we're defaulting to Python for our scripts, would it make sense to write this logic in Python instead? Or is there a benefit to leaving it in swift?

I was thinking about Python in the first place, but @granluo told me that iCore team uses swift script to update podfile.
So I use swift for the sake of consistency. And Gran probably gonna have a similar swift script in his 'cpp ios sdk unrelease testing project'.

@anonymous-akorn
Copy link
Contributor

I was thinking about Python in the first place, but @granluo told me that iCore team uses swift script to update podfile.
So I use swift for the sake of consistency. And Gran probably gonna have a similar swift script in his 'cpp ios sdk unrelease testing project'.

The Games team will be the ones maintaining this, though - leaving it in swift means another language they need to use. Though the script is unlikely to change in the future, so it's probably not a big deal. I'd suggest getting someone on the Games team to review the PR, since their approval is more relevant than mine for this.

Beyond that, LGTM.

@sunmou99 sunmou99 requested a review from DellaBitta October 26, 2020 20:18
@granluo
Copy link

granluo commented Oct 26, 2020

I think using Python could be an option for the script. The iOS team use Swift because Swift is their preferred language for command line tools. I would recommend Python since 1) Python is the major language for infra tools in Games team, and 2) it would be easier if other Python scripts want to reuse this tool. Unreleased testing could apply this tool and reviews for updates of this tool might be required.

@sunmou99
Copy link
Contributor Author

@granluo Updated to python script.

DellaBitta
DellaBitta previously approved these changes Nov 2, 2020
Copy link
Contributor

@DellaBitta DellaBitta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

granluo
granluo previously approved these changes Nov 2, 2020
@sunmou99 sunmou99 dismissed stale reviews from granluo and DellaBitta via 8f8305e November 2, 2020 20:48
@sunmou99 sunmou99 merged commit 5d63441 into dev Nov 2, 2020
@sunmou99 sunmou99 deleted the feature/update-podfile branch November 2, 2020 22:41
@firebase firebase locked and limited conversation to collaborators Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

4 participants