-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error message on parallel turtle parsing of scattered base and prefix declarations #1807
Better error message on parallel turtle parsing of scattered base and prefix declarations #1807
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1807 +/- ##
==========================================
+ Coverage 90.02% 90.16% +0.14%
==========================================
Files 396 399 +3
Lines 37974 38223 +249
Branches 4262 4281 +19
==========================================
+ Hits 34185 34463 +278
+ Misses 2493 2473 -20
+ Partials 1296 1287 -9 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure whether this fixes the problem in all cases.
I'll have to look into the parallel data structures, can we guarantee that we always see the first exception even when parsing multiple batches at once, where the first has an illegal prefix declaration, and the second one uses the prefix (which is then not found).
src/parser/RdfParser.cpp
Outdated
if (successfulParse && prefixAndBaseDisabled_) { | ||
raise( | ||
"@prefix or @base directives need to be at the beginning of the file " | ||
"when using the parallel parser. Use '--parse-parallel false' if you " | ||
"can't guarantee this."); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also refer the user to the mode that parses multiple files.
…oncurrently occuring ones. Signed-off-by: Johannes Kalmbach <[email protected]>
Signed-off-by: Johannes Kalmbach <[email protected]>
Conformance check passed ✅No test result changes. |
|
This reverts commit 8678731, which breaks the index build, see ad-freiburg/qlever-control#139
The parallel Turtle parser requires that all
PREFIX
andBASE
declarations stand in a single block at the beginning of the file.Until now, prefix declarations after this initial block led to an exception about the prefix being undeclared, which was highly misleading. With this PR, this case triggers a proper exception about PREFIX declarations being illegal in the middle of a Turtle file with the parallel parser, together with some guidance to mitigate this issue by either refactoring the input, or deactivating the parallel parser.
Fixes #1794 by providing a better message for the described error.