{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/json-ld-api/issues/14","repository_url":"https://api.github.com/repos/w3c/json-ld-api","labels_url":"https://api.github.com/repos/w3c/json-ld-api/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/w3c/json-ld-api/issues/14/comments","events_url":"https://api.github.com/repos/w3c/json-ld-api/issues/14/events","html_url":"https://github.com/w3c/json-ld-api/issues/14","id":346793755,"node_id":"MDU6SXNzdWUzNDY3OTM3NTU=","number":14,"title":"Circular imports: Abort, Retry, Fail?","user":{"login":"gkellogg","id":46296,"node_id":"MDQ6VXNlcjQ2Mjk2","avatar_url":"https://avatars0.githubusercontent.com/u/46296?v=4","gravatar_id":"","url":"https://api.github.com/users/gkellogg","html_url":"https://github.com/gkellogg","followers_url":"https://api.github.com/users/gkellogg/followers","following_url":"https://api.github.com/users/gkellogg/following{/other_user}","gists_url":"https://api.github.com/users/gkellogg/gists{/gist_id}","starred_url":"https://api.github.com/users/gkellogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkellogg/subscriptions","organizations_url":"https://api.github.com/users/gkellogg/orgs","repos_url":"https://api.github.com/users/gkellogg/repos","events_url":"https://api.github.com/users/gkellogg/events{/privacy}","received_events_url":"https://api.github.com/users/gkellogg/received_events","type":"User","site_admin":false},"labels":[{"id":965725362,"node_id":"MDU6TGFiZWw5NjU3MjUzNjI=","url":"https://api.github.com/repos/w3c/json-ld-api/labels/spec:enhancement","name":"spec:enhancement","color":"c11537","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-08-01T22:31:25Z","updated_at":"2018-10-24T15:00:29Z","closed_at":null,"author_association":"MEMBER","body":"From json-ld/json-ld.org#645 originally reported by @azaroth42 \r\n\r\nIn trying to build several inter-related contexts, we ran into the circular import issue. The current specification says that circular imports are an error condition.\r\n\r\n> Terms MUST NOT be used in a circular manner. That is, the definition of a term cannot depend on the definition of another term if that other term also depends on the first term.\r\n\r\nThe trouble arises when two contexts need to reference each other, potentially only in particular scopes, and when it's unknown which is the context that's used at the top of the tree.\r\n\r\nFor example, imagine two contexts. One defines the domain of Activities that are performed on resources.  The other defines classes and properties of some subset of those possible resources, and wants to refer to the activities that are performed.  From one perspective the Activity context is primary, and it merely talks about the things being acted upon. From the other perspective, the Object context is primary, and it references things that have happened to the resource of interest.\r\n\r\nThis example (and the equivalent with scoped contexts) is not valid:\r\n\r\n```\r\n{\r\n  \"@context\": \"activities-context\",\r\n  \"type\": \"Processing\",\r\n  \"target\": {\r\n    \"@context\": objects-context\",\r\n    \"type\": \"Thing\",\r\n    \"generated_by\": {\r\n      \"@context\": \"activities-context\",\r\n      \"type\": \"Generation\",\r\n      \"actor\": \"person\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nHowever if there are conflicts between the two (one defines `label` as a string, the other as a language map, for example), the simple resolution of pulling them both out and putting them at the top no longer works. If the contexts are maintained by different organizations and are updated at different schedules (schema.org and LDP for example) then managing exceptions is particularly hard. We ran into this issue here: https://github.com/IIIF/api/issues/1571\r\n\r\nThe above JSON (and even nicer with scoped contexts) seems like a reasonable thing to do. Advice (and subsequent recording of best practices) on how to resolve these sorts of issues would be appreciated!  "},"comment":{"url":"https://api.github.com/repos/w3c/json-ld-api/issues/comments/432695248","html_url":"https://github.com/w3c/json-ld-api/issues/14#issuecomment-432695248","issue_url":"https://api.github.com/repos/w3c/json-ld-api/issues/14","id":432695248,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjY5NTI0OA==","user":{"login":"azaroth42","id":871868,"node_id":"MDQ6VXNlcjg3MTg2OA==","avatar_url":"https://avatars3.githubusercontent.com/u/871868?v=4","gravatar_id":"","url":"https://api.github.com/users/azaroth42","html_url":"https://github.com/azaroth42","followers_url":"https://api.github.com/users/azaroth42/followers","following_url":"https://api.github.com/users/azaroth42/following{/other_user}","gists_url":"https://api.github.com/users/azaroth42/gists{/gist_id}","starred_url":"https://api.github.com/users/azaroth42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azaroth42/subscriptions","organizations_url":"https://api.github.com/users/azaroth42/orgs","repos_url":"https://api.github.com/users/azaroth42/repos","events_url":"https://api.github.com/users/azaroth42/events{/privacy}","received_events_url":"https://api.github.com/users/azaroth42/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T15:00:29Z","updated_at":"2018-10-24T15:00:29Z","author_association":"CONTRIBUTOR","body":"Attached zip has two example instances with the same structure, but the scoped context version (manifest-1.json) fails due to recursion and the inline `@context` version (manifest-2.json) works as intended.\r\n\r\n* manifest-1.json -- uses scoped contexts (in presentation.json, image.json)\r\n* manifest-2.json -- uses 1.0 inline context references (presentation-b.json, image-b.json)\r\n* presentation[-b].json, image[-b].json, anno.jsonld -- the context files\r\n* process.py -- python document loader and trivial expand() call to demonstrate the problem, at least in current PyLD.\r\n\r\n[recursive.zip](https://github.com/w3c/json-ld-api/files/2511028/recursive.zip)\r\n\r\nWill make dereferencable versions to also demonstrate in playground."}}
{"actor":{"display_login":"azaroth42"}}