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

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

Open
ddunbar opened this issue Mar 24, 2017 · 2 comments
Labels
bug good first issue Good for newcomers Edit

Comments

@ddunbar
Copy link
Member

ddunbar commented Mar 24, 2017

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
Copy link
Member Author

ddunbar commented Mar 24, 2017

We now have an implementation of the core delta debugging algorithm already in SwiftPM:
#1036

As a starter bug, this requires:

  • Learning about the behavior of existing tools like this (see description), and why they are useful

  • Figuring out how to invoke add a new tool to SwiftPM (e.g., {swift package minimize}).

  • Creating a model of what kinds of reductions to try to perform. Something simple like starting with each individual source line in the entire package would be a reasonable place to start.

  • Writing the logic to invoke the delta debugging algorithm with these reductions and then invoke the test predicate – this involves copying the source to a staging area, performing the modification, and then checking that the test predicate (i.e. shell script) passes or not.

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
Copy link

Resetting assignee for all Starter Bugs not modified since 2018.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
@tomerd tomerd added good first issue Good for newcomers Edit and removed Package Manager labels May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Good for newcomers Edit
Projects
None yet
Development

No branches or pull requests

3 participants