Coder Social home page Coder Social logo

Comments (5)

rahul-malik avatar rahul-malik commented on May 24, 2024

+1, Better licensing support issues seem to be already filed under the bazel repository:
bazelbuild/bazel#1440

from rules_apple.

rahul-malik avatar rahul-malik commented on May 24, 2024

@sergiocampama @allevato - Can you provide your thoughts here?

from rules_apple.

jerrymarino avatar jerrymarino commented on May 24, 2024

Thanks for the pointer @rahul-malik!

from rules_apple.

jerrymarino avatar jerrymarino commented on May 24, 2024

I think bazelbuild/bazel#1440 is orthogonal to this issue, but could help out a lot.

Acknowledgments.plist and Settings.bundle is pretty specific to Apple development, so maybe it belongs in rules_apple

I've dug into this more and I've discovered that licensing should be at the target level.

With 50 or so third party deps, licensing is defined at the target level and not the package. For example, we've got Texture as a dependency which has several targets in the package. A given target in Testure's build file, Texture_PINRemoteImage depends on targets, say PINRemoteImage which has it's own licensing requirements. Consequently, PINRemoteImage's license does not apply if we don't actually depend on it.

Currently I have achieved this by implementing a parallel structure to the objc_* targets:

  • define a rule, acknowledged_target, which has a value of an acknowledgement_fragment_plist, that contains licensing information.
  • acknowegledged_target, depend on other acknowledged_targets so we can aggregate all of the fragments into acknowledgment_plist
  • define an objc_bundle_library, Settings, which has a resource including acknowledgments_plist
  • define a rule, acknowledgments_plist, which aggregates all of the acknowledged_targets ( and their transitive deps into Acknowledgment.plist

This was some effort to pull off, but it's robust and meets my needs. I'm not sure how reasonable it'd be to integrate this without code generating all of the build files. Still, it is not 100% ideal.

Alternatives Considered:

Another approach could be to create dummy Settings.bundles for each dependency containing the acknowledgment_fragment_plist. Then, merge them together before constructing the final ipa with an ipa preprocessor

Conclusion

I think this feature is a good fit for rules_apple, since Acknowledgments.plist is needed for apps which leverage third party code. I don't think my implementation is upstream able or 100% reasonable.

If bazelbuild/bazel#1440 somehow allowed a user to associate a license file with each target, then, they could potentially aggregate those into Acknowledgments.plist at some point in the build graph. I think this would be ideal.

from rules_apple.

sergiocampama avatar sergiocampama commented on May 24, 2024

Sounds like this feature is blocked on the bazel issue. For now, manual inclusion sounds like the best workaround.

from rules_apple.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.