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

Add diagnostics for rustc_metadata #34970

Closed
wants to merge 13 commits into from
Closed

Add diagnostics for rustc_metadata #34970

wants to merge 13 commits into from

Conversation

jhod0
Copy link

@jhod0 jhod0 commented Jul 22, 2016

Part of #32777

Diagnostics messages are added for:
E0466 E0467 E0468 E0469 E0470

Additionally, rustc_driver is modified so that rustc_metadata diagnostics are available at runtime

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@GuillaumeGomez
Copy link
Member

Thanks for the PR! However please run make tidy and fix the issues please.

@@ -1112,6 +1112,7 @@ pub fn diagnostics_registry() -> errors::registry::Registry {
all_errors.extend_from_slice(&rustc_privacy::DIAGNOSTICS);
all_errors.extend_from_slice(&rustc_trans::DIAGNOSTICS);
all_errors.extend_from_slice(&rustc_const_eval::DIAGNOSTICS);
all_errors.extend_from_slice(&rustc_metadata::DIAGNOSTICS);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why adding this? (I'm curious)

@GuillaumeGomez
Copy link
Member

Also, you didn't follow the guidelines to write error codes that you can find here.

@jhod0
Copy link
Author

jhod0 commented Jul 22, 2016

I didn't think my original messages were in conflict with the guidelines - hopefully there is no problem now

@jhod0
Copy link
Author

jhod0 commented Jul 22, 2016

Looks like the tidy fixes did not work - I'll fix that later today

@GuillaumeGomez
Copy link
Member

Sure, just ping me back once done.

@jhod0
Copy link
Author

jhod0 commented Jul 22, 2016

@GuillaumeGomez should be good now

@jhod0
Copy link
Author

jhod0 commented Jul 22, 2016

OK I'm pretty unsure what the problem is, there are a few test failures

@jhod0
Copy link
Author

jhod0 commented Jul 22, 2016

Now that the metadata diagnostics are registered, it runs some doctests which were not previously registered.

So they had never been checked before, and naturally, they failed. I set them to ignore

That's not a cop-out: the failing tests were about attributes to extern crate's, there was no real functionality going on. I suppose they could be set to compile_fail

@jhod0
Copy link
Author

jhod0 commented Jul 23, 2016

@GuillaumeGomez All good now, sorry for the hassle!

@@ -14,14 +14,14 @@ register_long_diagnostics! {
E0454: r##"
A link name was given with an empty name. Erroneous code example:

```
```ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be compile_fail,E0454 and not ignore.


Causes of this error:

```ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be ignore.

@GuillaumeGomez
Copy link
Member

I just checked tidy and RFC things for now. Please update and then I'll check the content.

@jhod0
Copy link
Author

jhod0 commented Jul 30, 2016

@GuillaumeGomez passing checks


Erroneous code xamples:

```compile_fail
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the expected error code.

@GuillaumeGomez
Copy link
Member

Beside all this, your PR should contain a commit for each error code (so 3 if I'm not wrong).

@nikomatsakis
Copy link
Contributor

I'm going to go ahead and close this PR for inactivity. @jhod0 please feel free to re-open once you've had a chance to address @GuillaumeGomez's comments! <3

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

Successfully merging this pull request may close these issues.

4 participants