-
Notifications
You must be signed in to change notification settings - Fork 3
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
Preloaded contexts not used by json-ld gem in develop branch #4
Comments
Update: It seems like this affects only |
The point of json-ld-preloaded is to avoid http requests to common contexts by preloading them. Periodically, contexts are changed, and these need to be rebuilt. To be used, you specifically need to add the gem to either your Gemfile, or dependencies in your gemspec. The JSON-LD gem tries to load it, and it will insert the cache if it’s there, otherwise, it will go on and do loads. |
I’m sorry but I don’t think you understood the problem description. I know how to use the gem and it works for all common contexts except the identity one. What i have found is that the json-ld gem canonicalizes context URIs before checking the ‘PRELOADED’ constant, which means it checks if the http version is defined (not https). However this gem defines the https version for specifically the identity context (all other contexts are defined against http and creating a preload alias for https), which means it can never be found. I submitted a fix. |
Okay, sorry. I left a comment in the PR. The change goes in Rakefile, and re-run the |
Fixed in 2adb1df. |
I have tried to investigate which change could have led to this, but nothing obvious stands out to me. I can confirm that json-ld 3.0.2 and json-ld-preloaded 3.0.2 were using preloaded contexts, not executing any HTTP requests for them (specifically:
https://w3id.org/identity/v1
).However, commit e742697a0906e74e8bb777ef98137bc3955d981d of json-ld and json-ld-preloaded 3.0.4 are executing a HTTP request for the very same context URL. I have manually checked and
JSON::LD::Context::PRELOADED
containshttps://w3id.org/identity/v1
in both cases.The text was updated successfully, but these errors were encountered: