-
Notifications
You must be signed in to change notification settings - Fork 41
Explore the possibility of rebuilding the core logic using save_analysis
#94
Comments
The issue is that the library breaks every now and then on nightly, and that makes it unreliable in practice. Both clippy and rustfmt suffer from this problem, but these tools have minimized it to the point that it is no longer an issue:
I can think about two approaches to this problem:
Moving to |
I will say that making this a shipped rustup tool requires a lot more buy-in from everyone, and my gut feeling is that this tool is far from ready for that. Hell, it took clippy and RLS forever to do this, and clippy was in a much more mature state when we first started talking about this. However if you just want nightly breakage notifications you can do what servo does: set a travis cron job for building on nightly. (I'm working on getting access to this org so that I can fix travis) Also fwiw there are crates that RLS uses that let you slurp save-analysis info and get nicely typed data, if you need. |
On 2019-03-04, Manish Goregaokar wrote:
I will say that making this a shipped rustup tool requires a lot more buy-in from everyone, and my gut feeling is that this tool is far from ready for that. Hell, it took clippy and RLS forever to do this, and clippy was in a much more mature state when we first started talking about this.
However if you just want nightly breakage notifications you can do what servo does: set a travis cron job for building on nightly. (I'm working on getting access to this org so that I can fix travis)
Also fwiw there are crates that RLS uses that let you slurp save-analysis info and get nicely typed data, if you need.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#94 (comment)
Yes, having a travis cronjob worked a treat when the repo was still in
the nursery, but I was not able to set up CI since the migration.
I agree with the sentiment of little gain for a lot of work though, but
exploring this course of action was worthwhile, given your suggestion in
the dev tools team thread.
|
Yeah to be clear I'm not super familiar with the implementation, however unlike clippy you aren't going to keep accumulating lots of complicated logic so it should be possible to abstract it away in a way that gets you stability, either by using save-analysis or by upstreaming the abstractions. |
Given all the drawbacks of its current design (cc @Xanewok), I strongly disagree with building anything new on top of EDIT: just saw that @gnzlbg already proposed this upstreaming, so +1 to that! |
I strongly agree; I think upstreaming the compare bit is the right thing to do rather than trying to reimplement it using save_analysis. |
Since
librustc_save_analysis
is actually a somewhat stable API, a lot of breakage could be avoided (and at the same time, some issues with the checks could be easily addressed).However, since the API operates essentially on an AST level, a number of issues has to be solved:
To summarize, I believe such a change will cause a shift from relatively complex, but also somewhat compact functionality to much more code which will become possibly a bit simpler and tailored to our domain.
cc @Manishearth @gnzlbg you guys might be interested. While this could solve a number of problems on the backend side, we'd be reimplementing a lot of functionality that is already there.
The text was updated successfully, but these errors were encountered: