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

Rust error format updates and IDE support #229

Closed
sophiajt opened this issue Aug 8, 2016 · 9 comments
Closed

Rust error format updates and IDE support #229

sophiajt opened this issue Aug 8, 2016 · 9 comments

Comments

@sophiajt
Copy link

sophiajt commented Aug 8, 2016

I'm not sure if this will impact you, but I wanted to mention that we're currently talking about updating the Rust error format. For plugins using a regex style parse of the errors, this will likely have some impact.

If this PR is accepted, it will only initially impact the nightly builds. There are some weeks between the PR going it and a stable release including the new format. We'd like to use that time to make the transition as easy as possible.

As part of the PR, we're also enabling a supported JSON mode which IDE plugins can optionally use. It has the same information as the error text, but in a more structured way.

Please feel free to jump in on the PR thread and let us know if this impacts your plugin.

@Boddlnagg
Copy link
Contributor

This does indeed impact VisualRust, also compare #113. I might be able to work on porting the error recognition to use the JSON mode, once the PR has landed. In order to support previous rustc versions (and current stable), we probably need to switch modes based on the rustc version.

@Vbif
Copy link
Contributor

Vbif commented Aug 15, 2016

I have already written some code for json error in https://github.com/Vbif/VisualRust/tree/json_error_format

@Boddlnagg
Copy link
Contributor

@Vbif: This looks quite good, thanks! I think that using JSON errors shouldn't be a build option, though. Instead, VisualRust should transparently choose which error format is best, based on the version of rustc. It should never use -Z unstable-options now that this is becoming stable. Could you change this and open a PR?

@vosen: What do you think?

@Vbif
Copy link
Contributor

Vbif commented Aug 16, 2016

@Boddlnagg remove unstable is easy. How can i determine rustc version? First run rustc with --version every build?

@Boddlnagg
Copy link
Contributor

Boddlnagg commented Aug 16, 2016

@Vbif That is a very good question, and I don't have a good idea yet. Maybe it's possible to run rustc -V in the beginning of each "session", i.e. whenever a project is opened? I don't know a lot about the project system though, and this might not work at all, because the error parser is only part of the MSBuild plugin for Rust, and there probably is no "session".
Probably running rustc -V on every build as you proposed is the easiest way to make this work in the short term, and we can still change/optimize it later. I think that some kind of toolchain version detection is also useful for other parts.

@Vbif
Copy link
Contributor

Vbif commented Aug 27, 2016

#230

@sophiajt
Copy link
Author

Great to see some progress here!

Friendly reminder - I'm going to each plugin and letting them know we're 17 days away from Rust 1.12 being released. This is the first release that uses the new error format (and removes support for the old format). It also has the standardized JSON errors.

@Boddlnagg
Copy link
Contributor

@jonathandturner Thanks for the reminder! We're going to be able to push this PR through the finish line until the release of 1.12, but I can't do a VisualRust release. I think only @vosen (this project's official maintainer) can do that, and he hasn't responded in the last weeks.

@Boddlnagg
Copy link
Contributor

#230 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants