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 example approach to Danger framework with module stability #579

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DavidBrunow
Copy link

This pull request shows an example implementation of changes that could be made to enable module stability for the Danger dependency used by Dangerfile.swift. It also builds a universal binary for danger-swift.

All credit for the idea goes to @bobergj, I saw this comment, needed to implement it for a fork used internally at work, and thought I'd share it in case it is useful: #476 (comment)

Drawbacks to this approach in general (as mentioned in that issue):

  • Needs a project file which could get out of sync with the Package.swift
  • @_implementationOnly is underscored and is going to change in the future

This specific implementation also has this very large problem:

  • It does not solve for the problem of the OctoKit API being exposed to consumers.

I've added a script that shows how danger-swift and the Danger.framework can be built.

@rarias84
Copy link

rarias84 commented Apr 4, 2023

how I can use this approach?

@DavidBrunow
Copy link
Author

how I can use this approach?

If you are using GitHub then you cannot use the current state of this because more work would need to be done to wrap the OctoKit dependency.

If you are using a different tool, like BitBucket or GitLab, you can run the build_runner_and_framework.sh script which will create a danger_swift binary and a Danger.framework framework. I've only experimented with those being in the same directory when running Danger Swift but theoretically you could place both somewhere in your path and things would "just work".

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 this pull request may close these issues.

None yet

2 participants