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:
parent
7bd3bbd78e
commit
deaa1172cf
|
@ -77,7 +77,8 @@ ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE)
|
||||||
|
|
||||||
D := $(S)src/doc
|
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 :=
|
COMPILER_DOC_TARGETS :=
|
||||||
DOC_L10N_TARGETS :=
|
DOC_L10N_TARGETS :=
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,6 @@ use std::collections::BTreeMap;
|
||||||
use ast;
|
use ast;
|
||||||
use ast::{Ident, Name, TokenTree};
|
use ast::{Ident, Name, TokenTree};
|
||||||
use codemap::Span;
|
use codemap::Span;
|
||||||
use diagnostics::metadata::{check_uniqueness, output_metadata, Duplicate};
|
|
||||||
use ext::base::{ExtCtxt, MacEager, MacResult};
|
use ext::base::{ExtCtxt, MacEager, MacResult};
|
||||||
use ext::build::AstBuilder;
|
use ext::build::AstBuilder;
|
||||||
use parse::token;
|
use parse::token;
|
||||||
|
@ -148,7 +147,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt,
|
||||||
token_tree: &[TokenTree])
|
token_tree: &[TokenTree])
|
||||||
-> Box<MacResult+'cx> {
|
-> Box<MacResult+'cx> {
|
||||||
assert_eq!(token_tree.len(), 3);
|
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.
|
// Crate name.
|
||||||
&ast::TtToken(_, token::Ident(ref 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!()
|
_ => unreachable!()
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check uniqueness of errors and output metadata.
|
// FIXME (#25705): we used to ensure error code uniqueness and
|
||||||
with_registered_diagnostics(|diagnostics| {
|
// output error description JSON metadata here, but the approach
|
||||||
match check_uniqueness(crate_name, &*diagnostics) {
|
// employed was too brittle.
|
||||||
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");
|
|
||||||
});
|
|
||||||
|
|
||||||
// Construct the output expression.
|
// Construct the output expression.
|
||||||
let (count, expr) =
|
let (count, expr) =
|
||||||
|
|
Loading…
Reference in New Issue