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

Create cocoapods plugin for enumerating dependencies for licensed #636

Closed
jonabc opened this issue Mar 5, 2023 · 3 comments · Fixed by #644
Closed

Create cocoapods plugin for enumerating dependencies for licensed #636

jonabc opened this issue Mar 5, 2023 · 3 comments · Fixed by #644

Comments

@jonabc
Copy link
Contributor

jonabc commented Mar 5, 2023

Cocoapods recently released a 1.12 update that includes a relaxation on the activesupport requirement from < 7 to < 8. The version update was needed for licensed to be able to integrate with cocoapods, however with that work done I'm concerned that the versioning is going to cause issues again in the future.

Instead of keeping the integration that exists with cocoapods, I think a better solution is to create a cocoapods plugin similar to https://github.com/segiddins/cocoapods-dependencies that can be used by licensed. That plugin doesn't look like a good fit for licensed usage because for basic pod dependencies usage it seems to just print the podfile.lock entries without any additional data like targets or path to the root pod folder.

The plugin could expose a new CLI command that would be used by licensed, more or less pulling the code from Cocoapods#enumerate_dependency into a separate gem. The plugin would output the resulting name, path, and version data to the CLI in an easily parseable format like JSON or YAML or similar.

sequenceDiagram
    participant L as licensed
    participant P as Cocoapods plugin
    L ->> P: call plugin CLI, e.g. `pod dependencies list --targets ...`
    P ->> P: enumerate dependency information
    P ->> L: JSON (or similar) formatted list of dependencies
Loading

This approach offers a few benefits:

  1. It decouples cocoapods dependency requirements from licensed's dependency requirements, resolving any concerns about this problem in the future.
  2. It removes any concern about bloating licensed's installation size from the full cocoapods gem
  3. It makes the functionality usable for other enumeration tools

cc @LouisBoudreau does this seem reasonable?

@LouisBoudreau
Copy link
Contributor

This really seems like a great idea!

When implementing the support of cocoapods into licensed the activesupport dependency requirements and the conflicts that could emerge is not something I thought about.

Just like you, I think the the most important thing for licensed is it's stability. So investing time to make the cocoapods integration less prone to requirements failure is a great idea

@jonabc
Copy link
Contributor Author

jonabc commented Mar 13, 2023

I've created the plugin here but haven't yet published it. I'll make sure the integration with licensed works well before writing a README and releasing the plugin to rubygems

@jonabc
Copy link
Contributor Author

jonabc commented Mar 20, 2023

This is shipped in licensed 4.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants