iomentum / cargo-breaking

Mozilla Public License 2.0
112 stars 7 forks source link

[Tracking issue] going farther than the AST #2

Open scrabsha opened 3 years ago

scrabsha commented 3 years ago

Ideally we should have our own types, that are a bit more abstract than what syn currently provides. For instance, we don't need to keep the fn token when storing a function signature. Similarly, we don't need the :: when storing an item path.

One of the greatest benefits is that we could do some simple operations during the conversion. A simple example is trait bounds. cargo-breaking currently treats the change T: Send + Sync to T: Sync + Send as a breaking change. As a fix, we could alphabetically sort the bounds when converting data to our own types.

This issue lists what needs to be implemented to fit these goals:

This list is not exhaustive, some items may be added in the future.

scrabsha commented 3 years ago

Given the progress of the rustc backend (see #19), this issue is likely to get obsoleted soon.