|
1 | 1 | fn main() { |
2 | 2 | println!("Hello, world!"); |
| 3 | + |
| 4 | + // TODO: Things what need to be done: |
| 5 | + // 1. Get the projects that have changed |
| 6 | + // - Get files that have changed |
| 7 | + // - If main branch this is diff from HEAD^ |
| 8 | + // - If PR this is merge-base between current branch & PR base branch |
| 9 | + // - If not PR but not main probably just do merge-base between current branch & main |
| 10 | + // - Take this and map to cargo proejcts |
| 11 | + // 2. Get deps that have changed |
| 12 | + // - Open & read lockfile |
| 13 | + // - Open & read lockfile in base commit, where-ever that is. |
| 14 | + // (Possibly using github API for this, not sure) |
| 15 | + // - Diff the dependencies somehow? Not entirely sure how |
| 16 | + // 3. Combine the outputs from 1 & 2 somehow |
| 17 | + // 4. Use this to generate a list of projects that have directly changed |
| 18 | + // 5. Use that + a graph of deps to find projects that have been impacted |
| 19 | + // 6. Possibly also use that to find binary targets that have been impacted |
| 20 | + |
| 21 | + // Implementation plan: |
| 22 | + // Step 1 is trivial, unsurprising and easy to fake so skip it for now and take input |
| 23 | + // Step 2: |
| 24 | + // - Probably do need the comparison code but could skip doing git things for now? |
| 25 | + // Step 3-6 probably essential. |
| 26 | + |
| 27 | + // Testing plan |
| 28 | + // Ideally I want to see how effective this would be by looking at previous builds? |
| 29 | + // - Fetch PRs, |
| 30 | + // - Feed data for each PR in |
| 31 | + // - Need some way of measuring how much effort could be saved? |
| 32 | + // Maybe # of deps changed vs the total, graphed or something? |
3 | 33 | } |
0 commit comments