Skip to content

Add protected term redefinition tests. #92

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

Merged
merged 3 commits into from
Jun 13, 2019
Merged

Conversation

davidlehn
Copy link
Contributor

@davidlehn davidlehn commented May 21, 2019

A few of these tests look a bit crazy. Sorry. ;-) Suggested improvements would be welcome.


Preview | Diff

@dlongley
Copy link
Contributor

@gkellogg,

This is related to #90.

@dlongley
Copy link
Contributor

@davidlehn, can you resolve the conflict?

@davidlehn davidlehn force-pushed the protected-term-redefinition branch from 0a058f8 to dd95cc3 Compare May 28, 2019 16:49
@davidlehn
Copy link
Contributor Author

@dlongley Fixed.

@dlongley
Copy link
Contributor

@davidlehn, thanks!

…cal protected terms.

Note that the algorithm sets terms to `null` in context if they're defined as `null` or `{"@id": null}` and doesn't retain the protected status, which it probably should.
@gkellogg gkellogg requested a review from dlongley June 10, 2019 23:32
@gkellogg
Copy link
Member

@dlongley note the comment in the last commit: "Note that the algorithm sets terms to null in context if they're defined as null or {"@id": null} and doesn't retain the protected status, which it probably should."

If you agree, I'll update that part too.

@dlongley
Copy link
Contributor

@gkellogg,

@dlongley note the comment in the last commit: "Note that the algorithm sets terms to null in context if they're defined as null or {"@id": null} and doesn't retain the protected status, which it probably should."

If you agree, I'll update that part too.

It does seem like it should to retain protected status, i.e. what we're saying is that we'd allow for terms to be defined as null and protect that null definition, right? I know we have some other issue about it perhaps doing that for prefixes for security purposes.

We'd have to implement it to make sure it doesn't do anything strange or break any existing tests. We would also need new tests to check it. Have you happened to have implemented it and run it against the existing tests?

@gkellogg
Copy link
Member

My implementation does create an empty term definition for either null or {"@id": null}, although it doesn't presently set @protected on it.

We should update step 5.4 in IRI Expansion to not use a term as a Compact IRI prefix if it's IRI mapping is null.

@gkellogg gkellogg merged commit da0dc41 into master Jun 13, 2019
@gkellogg gkellogg deleted the protected-term-redefinition branch June 13, 2019 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants