Skip to content

Commit

Permalink
Removes skip list for incompletness checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
zslayton committed Jan 7, 2025
1 parent 9a6473d commit a9583c5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 37 deletions.
4 changes: 1 addition & 3 deletions src/lazy/text/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ macro_rules! scalar_value_matchers {
impl Debug for TextBuffer<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
const CHARS_TO_SHOW: usize = 64;
write!(f, "Buf {{")?;
write!(f, "TextBuffer {{")?;
// Try to read the next several bytes from the buffer as UTF-8...
let text_result = std::str::from_utf8(self.data);
// ...if it works, print the first 64 Unicode scalars...
Expand Down Expand Up @@ -738,8 +738,6 @@ impl<'top> TextBuffer<'top> {
let ((macro_id, macro_ref, mut arg_expr_cache), matched_input) =
parser.with_taken().parse_next(self)?;

// let matched_input = self.slice(0, input.offset() - self.offset());

let parameters = macro_ref.signature().parameters();
if arg_expr_cache.len() < parameters.len() {
// If expressions were not provided for all arguments, it was due to rest syntax.
Expand Down
17 changes: 0 additions & 17 deletions src/lazy/text/raw/sequence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,23 +209,6 @@ impl<'data, E: TextEncoding<'data>> Iterator for RawTextSExpIterator<'data, E> {
}
}
}

// fn next(&mut self) -> Option<Self::Item> {
// if self.has_returned_error {
// return None;
// }
// match self.input.match_sexp_item() {
// Ok(Some(value)) => Some(Ok(RawValueExpr::ValueLiteral(LazyRawTextValue::<E>::from(
// value,
// )))),
// Ok(None) => None,
// Err(e) => {
// self.has_returned_error = true;
// e.with_context("reading the next sexp value", self.input)
// .transpose()
// }
// }
// }
}

impl<'data, E: TextEncoding<'data>> LazyContainerPrivate<'data, E> for RawTextSExp<'data, E> {
Expand Down
17 changes: 0 additions & 17 deletions tests/detect_incomplete_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,12 @@ use test_generator::test_resources;

mod ion_tests;

// These tests are all failing because multipart long strings are not handled correctly when the
// "part" boundary happens to also fall on a point where the reader needs to refill the input buffer.
const INCOMPLETE_LONG_STRING_SKIP_LIST: SkipList = &[
"ion-tests/iontestdata/good/equivs/localSymbolTableAppend.ion",
"ion-tests/iontestdata/good/equivs/localSymbolTableNullSlots.ion",
"ion-tests/iontestdata/good/equivs/longStringsWithComments.ion",
"ion-tests/iontestdata/good/equivs/strings.ion",
"ion-tests/iontestdata/good/lists.ion",
"ion-tests/iontestdata/good/strings.ion",
"ion-tests/iontestdata/good/stringsWithWhitespace.ion",
"ion-tests/iontestdata/good/strings_cr_nl.ion",
"ion-tests/iontestdata/good/strings2.ion",
"ion-tests/iontestdata/good/structs.ion",
"ion-tests/iontestdata/good/strings_nl.ion",
];

// A copy of the `ELEMENT_GLOBAL_SKIP_LIST` in which each file name has been canonicalized for the
// current host machine. This makes it possible to compare names in the list with names of files
// on the host without worrying about differences in (for example) path separators.
static CANONICAL_FILE_NAMES: LazyLock<Vec<String>> = LazyLock::new(|| {
ELEMENT_GLOBAL_SKIP_LIST
.iter()
.chain(INCOMPLETE_LONG_STRING_SKIP_LIST.iter())
.filter_map(|filename| {
// Canonicalize the skip list file names so they're in the host OS' preferred format.
// This involves looking up the actual file; if canonicalization fails, the file could
Expand Down

0 comments on commit a9583c5

Please sign in to comment.