-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix set semantics bug with other store interface #10
Fix set semantics bug with other store interface #10
Conversation
Pull Request Test Coverage Report for Build 7609127000
💛 - Coveralls |
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.
Yes, this looks perfect to me!
@surilindur could you try this out in link-traversal master and your void branch?
subject: RDF.Term | null, | ||
predicate: RDF.Term | null, | ||
object: RDF.Term | null, | ||
graph: RDF.Term | null, |
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.
subject: RDF.Term | null, | |
predicate: RDF.Term | null, | |
object: RDF.Term | null, | |
graph: RDF.Term | null, | |
subject?: RDF.Term | null, | |
predicate?: RDF.Term | null, | |
object?: RDF.Term | null, | |
graph?: RDF.Term | null, |
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.
n3 store doesn't support undefined
: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/4c017214b1c3fcfd5bb1637035f806b06c6b76d3/types/n3/index.d.ts#L295 the OTerm can only be a RDF.Term
, string or null.
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.
It actually does support undefined
: https://github.com/rdfjs/N3.js/blob/main/src/N3Store.js#L445-L447
But it appears the typings are not fully correct.
So yeah, let's keep it as-is for now. We can modify later once the N3 typings would get fixed.
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 assume this is support for when OTerm is null
but the logic is the same for undefined
.
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.
Indeed, but since null
is not the same as undefined
, tsc will complain about it.
This seems to produce the same results as the current 1.1.2 version in link traversal master branch, so it definitely does not seem to break that this time. I am also fairly sure I tested the correct versions of everything this time. Edit: also the tests in link traversal pass. I will try to test with the VoID stuff soon, either today or tomorrow. |
After testing the version from this branch with the VoID-related work, it also seems to consistently produce the same results every time, with no spurious duplicates, since I cannot seem to be able to reproduce the cases where it was producing random numbers of results or exactly double the expected. |
Excellent, thanks for checking @surilindur, and thanks for the fix @maartyman! |
@rubensworks is this what you had in mind?