Remove error diagnostics uniqueness check and .json generation.

This is meant to be a temporary measure to get the builds to be
reliable again; see also Issue #25705.
This commit is contained in:
Felix S. Klock II 2015-05-19 14:26:39 +02:00
parent 7bd3bbd78e
commit deaa1172cf
2 changed files with 6 additions and 18 deletions

View File

@ -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 :=

View File

@ -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;
@ -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, _)),
@ -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) =