danger / danger/swift

Proposal: Revised plugin system

Open
#139 8 comments 4 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
1.1k
Forks
152
Avg merge
9h 54m
Merged PRs (30d)
2

Description

So, the current idea of plugins is great until we got it working out in prod for a while.

Roughly how it is now:

- We detect if there are special strings in the Dangerfile before evaluation
- If there are, we use Marathon to dynamically create a SwiftPM project, and compile those dependencies
- The evaluation of the Dangerfile.swift then has the build products added to its runtime path, and things hook up

This is fine, but it's actually not. It takes forever to clone and build all of those dependencies and causes https://github.com/danger/swift/issues/97

So, instead **I have two proposals**:

- Because Swift's tooling set is so much smaller, we could take SwiftLint and SwiftFormat and move them into Danger for Swift

Roughly deprecate the need for using plugins anyway, if everyone is gonna use the same ones anyway. It's a tighter eco-system, so maybe Danger can be more focused? I'm open to change.

- Move then idea of plugins from being owned by Danger to being owned by SwiftPM

This is aiming to save build time, by not re-cloning, and re-building danger etc. We'd need to figure out how to make local library dependencies available to the runtime Dangerfile, but I don't think that's too tricky in my head. I've just not put enough thought into how that can actually work.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.