fix(sparql-anything): concatenate outputs without blank lines or listener leaks - #833
Open
ddeboer wants to merge 1 commit into
Open
fix(sparql-anything): concatenate outputs without blank lines or listener leaks#833ddeboer wants to merge 1 commit into
ddeboer wants to merge 1 commit into
Conversation
…ener leaks - Write the newline between two per-chunk outputs only when the previous one does not end in one, so the result is byte for byte what `cat` gives; SPARQL Anything’s N-Triples writer always ends in a newline, so every boundary carried a blank line. - Run one pipeline over every output rather than one per output into a shared write stream, which left listeners behind per file and had Node warn of a leak past ten chunks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes to
concatenate()inSparqlAnythingConverter:catgives. Consumers that stripped blank lines before diffing against a shell run can drop that.pipeline()into one shared write stream, and each left its listeners on it, so Node printedMaxListenersExceededWarningfor runs of more than ten chunks. The outputs now feed one pipeline through an async generator, which also gives a single error path.Tests cover both: outputs ending in a newline concatenate byte for byte to their joined contents, an output without one still gets a newline before the next, and twelve chunks emit no process warning. The docs section on how a conversion runs describes the new behaviour.
Fix #821