Skip to content

Commit

Permalink
Remove error diagnostics uniqueness check and .json generation.
Browse files Browse the repository at this point in the history
This is meant to be a temporary measure to get the builds to be
reliable again; see also Issue #25705.
  • Loading branch information
pnkfelix committed May 22, 2015
1 parent 7bd3bbd commit deaa117
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
3 changes: 2 additions & 1 deletion mk/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE)

D := $(S)src/doc

DOC_TARGETS := trpl style error-index
# FIXME (#25705) eventually may want to put error-index target back here.
DOC_TARGETS := trpl style
COMPILER_DOC_TARGETS :=
DOC_L10N_TARGETS :=

Expand Down
21 changes: 4 additions & 17 deletions src/libsyntax/diagnostics/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use std::collections::BTreeMap;
use ast;
use ast::{Ident, Name, TokenTree};
use codemap::Span;
use diagnostics::metadata::{check_uniqueness, output_metadata, Duplicate};
use ext::base::{ExtCtxt, MacEager, MacResult};
use ext::build::AstBuilder;
use parse::token;
Expand Down Expand Up @@ -148,7 +147,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt,
token_tree: &[TokenTree])
-> Box<MacResult+'cx> {
assert_eq!(token_tree.len(), 3);
let (crate_name, name) = match (&token_tree[0], &token_tree[2]) {
let (_crate_name, name) = match (&token_tree[0], &token_tree[2]) {
(
// Crate name.
&ast::TtToken(_, token::Ident(ref crate_name, _)),
Expand All @@ -158,21 +157,9 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt,
_ => unreachable!()
};

// Check uniqueness of errors and output metadata.
with_registered_diagnostics(|diagnostics| {
match check_uniqueness(crate_name, &*diagnostics) {
Ok(Duplicate(err, location)) => {
ecx.span_err(span, &format!(
"error {} from `{}' also found in `{}'",
err, crate_name, location
));
},
Ok(_) => (),
Err(e) => panic!("{}", e.description())
}

output_metadata(&*ecx, crate_name, &*diagnostics).ok().expect("metadata output error");
});
// FIXME (#25705): we used to ensure error code uniqueness and
// output error description JSON metadata here, but the approach
// employed was too brittle.

// Construct the output expression.
let (count, expr) =
Expand Down

0 comments on commit deaa117

Please sign in to comment.