swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.74k stars 1.34k forks source link

[SR-4329] SwiftPM should have a feature to "auto-minimize" a package (delta debugging) #5059

Open ddunbar opened 7 years ago

ddunbar commented 7 years ago
Previous ID SR-4329
Radar None
Original Reporter @ddunbar
Type Bug
Status In Progress
Resolution
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Package Manager | |Labels | Bug, StarterBug | |Assignee | None | |Priority | Medium | md5: 83f2d1d181b16d93390c4b88e07dd5ff

Issue Description:

SwiftPM should have a feature to automatically minimize a package to the smallest package to pass some test predicate (supplied by a shell script, for example).

This is invaluable tool for getting high quality / actionable bug reports for compiler crashes, build failures, etc. from developers who may not otherwise be able to share their source code.

Similar tools in this space are:
C-Reduce: https://embed.cs.utah.edu/creduce/
Delta: http://delta.tigris.org
Bugpoint: http://llvm.org/docs/Bugpoint.html
and we know from experience that these tools can be very powerful at efficiently reducing even very large test inputs to small test cases.

ddunbar commented 7 years ago

We now have an implementation of the core delta debugging algorithm already in SwiftPM:
https://github.com/apple/swift-package-manager/pull/1036

As a starter bug, this requires:

I think this is a good starter bug because it is a potentially high-value feature that is purely additive and doesn't require significant design discussion (beyond the software engineering level).

belkadan commented 5 years ago

Resetting assignee for all Starter Bugs not modified since 2018.