Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add an option to "pod lib lint" so that it compiles in Debug mode #9686

Closed
1 task done
gereons opened this issue Apr 4, 2020 · 6 comments
Closed
1 task done
Labels
t3:discussion These are issues that can be non-issues, and encompass best practices, or plans for the future.
Milestone

Comments

@gereons
Copy link
Contributor

gereons commented Apr 4, 2020

I would like to propose that pod lib lint gets an option to specify which configuration to build. Right now, building Release is hardcoded in validator.rb, and that should remain the default. Allowing for a command line option like pod lib lint --configuration=Debug or maybe simply pod lib lint --debug would allow users to specify compiling in Debug mode.

The reason for this request is that I'm running my CI builds on a system that is metered by CPU minutes, and where Mac CPU minutes are worth 10 times as much as a "regular" minute. Thus, optionally speeding up linting not only provides for faster feedback, it is also significantly cheaper.

Initial tests show that linting times would improve significantly: one of the pods I'm maintaining takes ~5 minutes to lint using Release, and only ~1min 20s using Debug.

If this proposal is accepted, I can provide a PR on short notice.

@dnkoutso
Copy link
Contributor

dnkoutso commented Apr 4, 2020

It may have been discussed in the past..I think the reason for that is that pods are meant to be published and ensure that they can be released for Release configuration.

Why not use other means to test that like https://github.com/square/cocoapods-generate to produce a workspace and invoke xcodebuild on it?

@dnkoutso dnkoutso added the t3:discussion These are issues that can be non-issues, and encompass best practices, or plans for the future. label Apr 4, 2020
@paulb777
Copy link
Member

paulb777 commented Apr 4, 2020

I could support such a feature.

While the Release config is important for the final app, the developer clients of source pods typically use them in both Debug and Release configurations.

While pod generate is great for pod development, a one line pod lib lint invocation is nicer for CI use cases.

@gereons
Copy link
Contributor Author

gereons commented Apr 5, 2020

Admittedly, I did not know about pod gen. I tried it, but unfortunately it does not work with my pod because it somehow insists on building for Catalyst instead of iOS - I'll investigate further and will probably file an issue in its repo.

Anyway, the point of my suggestion was to have a way to get all the validations that pod lib lintdoes, just faster and without installing extra modules. My plan would be to run the fast/debug version for branch commits, and use the release/expensive checks for when a pod's release is published.

@gereons
Copy link
Contributor Author

gereons commented Apr 9, 2020

Can I ask for some guidance on how to continue? With what looks to me like a "dunno" and a +1, should I provide the PR? If so, what should the option be called?

@paulb777
Copy link
Member

For the option name, how about the specific --configuration-debug or the more flexible --configuration={config}?

@dnkoutso Would such a PR get merged?

gereons added a commit to gereons/CocoaPods that referenced this issue May 2, 2020
gereons added a commit to gereons/CocoaPods that referenced this issue May 7, 2020
@amorde amorde added this to the 1.10.0 milestone May 7, 2020
@amorde
Copy link
Member

amorde commented May 7, 2020

Closing as #9760 was merged - this will be released in 1.10 👍

@amorde amorde closed this as completed May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t3:discussion These are issues that can be non-issues, and encompass best practices, or plans for the future.
Projects
None yet
Development

No branches or pull requests

4 participants