{"action":"created","comment":{"url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/comments/93127940","pull_request_review_id":13650154,"id":93127940,"diff_hunk":"@@ -217,23 +180,55 @@ const Domain = new Lang.Class({\n     },\n \n     /**\n-     * Function: load_sync\n+     * Function: load_shards_sync\n      *\n      * Loads up the shard needed for this domain.\n      */\n-    load_sync: function () {\n-        if (this._shard_inited)\n+    load_shards_sync: function () {\n+        if (this._shards_inited)\n             return;\n \n-        this.get_shards(null);\n+        let manifest_file = this._get_manifest_file();\n+        // If the manifest.json doesn't exist, and we have a manifest in the bundle, symlink\n+        // to it to bootstrap our subscription.\n+        if (!manifest_file.query_exists(null)) {\n+            let bundle_dir = this._get_bundle_dir();\n+            let bundle_manifest_file = bundle_dir.get_child('manifest.json');\n+            if (bundle_manifest_file.query_exists(null)) {\n+                manifest_file.make_symbolic_link(bundle_manifest_file.get_path(), null);\n+            } else {\n+                throw new Gio.IOErrorEnum({\n+                    message: 'You have no manifest.json and are not ' +\n+                        'running from a Flatpak bundle. You must download' +\n+                        ' a content update.',\n+                    code: Gio.IOErrorEnum.NOT_FOUND,\n+                });\n+            }\n+        }\n+\n+        this._make_bundle_symlinks(null);\n+\n+        let [success, data] = manifest_file.load_contents(null);\n+        let manifest = JSON.parse(data);\n+\n+        let subscription_dir = this._get_subscription_dir();\n+        this._shards = manifest.shards.map(function(shard_entry) {\n+            let file = subscription_dir.get_child(shard_entry.path);\n+            return new EosShard.ShardFile({\n+                path: file.get_path(),\n+            });\n+        });\n         // Don't allow init() to be cancelled; otherwise,\n         // cancellation will spoil the object for future use.\n         Eknc.utils_parallel_init(this._shards, 0, null);\n \n+        // Append shards to default EknVfs for ekn:// uri to work\n+        Eknc.default_vfs_set_shards(this._shards);","path":"js/search/domain.js","position":421,"original_position":135,"commit_id":"00c83591f73d74a1f180ab82400a6448b0fe8f1a","original_commit_id":"f9f09541fdcc43dcd508487558a5eed387830d90","user":{"login":"mattdangerw","id":1389937,"avatar_url":"https://avatars.githubusercontent.com/u/1389937?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdangerw","html_url":"https://github.com/mattdangerw","followers_url":"https://api.github.com/users/mattdangerw/followers","following_url":"https://api.github.com/users/mattdangerw/following{/other_user}","gists_url":"https://api.github.com/users/mattdangerw/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdangerw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdangerw/subscriptions","organizations_url":"https://api.github.com/users/mattdangerw/orgs","repos_url":"https://api.github.com/users/mattdangerw/repos","events_url":"https://api.github.com/users/mattdangerw/events{/privacy}","received_events_url":"https://api.github.com/users/mattdangerw/received_events","type":"User","site_admin":false},"body":"Cool. I'll just rename stuff to make explicit for now.","created_at":"2016-12-19T21:55:10Z","updated_at":"2016-12-19T21:55:10Z","html_url":"https://github.com/endlessm/eos-knowledge-lib/pull/1294#discussion_r93127940","pull_request_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1294","_links":{"self":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/comments/93127940"},"html":{"href":"https://github.com/endlessm/eos-knowledge-lib/pull/1294#discussion_r93127940"},"pull_request":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1294"}}},"pull_request":{"url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1294","id":98056571,"html_url":"https://github.com/endlessm/eos-knowledge-lib/pull/1294","diff_url":"https://github.com/endlessm/eos-knowledge-lib/pull/1294.diff","patch_url":"https://github.com/endlessm/eos-knowledge-lib/pull/1294.patch","issue_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/1294","number":1294,"state":"open","locked":false,"title":"T13418 kill domain v2","user":{"login":"mattdangerw","id":1389937,"avatar_url":"https://avatars.githubusercontent.com/u/1389937?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdangerw","html_url":"https://github.com/mattdangerw","followers_url":"https://api.github.com/users/mattdangerw/followers","following_url":"https://api.github.com/users/mattdangerw/following{/other_user}","gists_url":"https://api.github.com/users/mattdangerw/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdangerw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdangerw/subscriptions","organizations_url":"https://api.github.com/users/mattdangerw/orgs","repos_url":"https://api.github.com/users/mattdangerw/repos","events_url":"https://api.github.com/users/mattdangerw/events{/privacy}","received_events_url":"https://api.github.com/users/mattdangerw/received_events","type":"User","site_admin":false},"body":"Don't merge this till tests have been fixed!!!\r\n\r\nHere's some API changes I'm planning to make the rest of the C port easier and generally clean up our content API a bit.\r\n\r\nPlenty of different ways we could go about this, so putting this up quickly without looking at tests (or testing much) to get feedback.\r\n\r\nMajor changes\r\n - Kill domain object v2\r\n - Application calls downloader directly (needed to port domain to C but leave downloader in js for the time being)\r\n - Remove broken command line option setting datadir\r\n - Some general cleanups\r\n\r\nProbably a bit easier to go commit by commit. The diff on domain is kinda terrible, but its basically just moving things around.\r\n\r\nhttps://phabricator.endlessm.com/T13418","created_at":"2016-12-14T23:17:00Z","updated_at":"2016-12-19T21:55:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e48b562aac6154d19662bdea14c99b13df91010","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1294/commits","review_comments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1294/comments","review_comment_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/1294/comments","statuses_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/statuses/00c83591f73d74a1f180ab82400a6448b0fe8f1a","head":{"label":"endlessm:T13418-kill-domain-v2","ref":"T13418-kill-domain-v2","sha":"00c83591f73d74a1f180ab82400a6448b0fe8f1a","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":18152801,"name":"eos-knowledge-lib","full_name":"endlessm/eos-knowledge-lib","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/eos-knowledge-lib","description":"GUI library for knowledge apps","fork":false,"url":"https://api.github.com/repos/endlessm/eos-knowledge-lib","forks_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/forks","keys_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/teams","hooks_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/hooks","issue_events_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/events","assignees_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/tags","blobs_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/languages","stargazers_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/stargazers","contributors_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/contributors","subscribers_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/subscribers","subscription_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/subscription","commits_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/merges","archive_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/downloads","issues_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/releases{/id}","deployments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/deployments","created_at":"2014-03-26T20:28:39Z","updated_at":"2016-10-24T19:50:30Z","pushed_at":"2016-12-19T21:26:21Z","git_url":"git://github.com/endlessm/eos-knowledge-lib.git","ssh_url":"git@github.com:endlessm/eos-knowledge-lib.git","clone_url":"https://github.com/endlessm/eos-knowledge-lib.git","svn_url":"https://github.com/endlessm/eos-knowledge-lib","homepage":null,"size":24688,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":2,"default_branch":"master"}},"base":{"label":"endlessm:master","ref":"master","sha":"09e99e788f19fb4018eab31afa5d66ea30afb1fe","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":18152801,"name":"eos-knowledge-lib","full_name":"endlessm/eos-knowledge-lib","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/eos-knowledge-lib","description":"GUI library for knowledge apps","fork":false,"url":"https://api.github.com/repos/endlessm/eos-knowledge-lib","forks_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/forks","keys_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/teams","hooks_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/hooks","issue_events_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/events","assignees_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/tags","blobs_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/languages","stargazers_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/stargazers","contributors_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/contributors","subscribers_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/subscribers","subscription_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/subscription","commits_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/merges","archive_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/downloads","issues_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/releases{/id}","deployments_url":"https://api.github.com/repos/endlessm/eos-knowledge-lib/deployments","created_at":"2014-03-26T20:28:39Z","updated_at":"2016-10-24T19:50:30Z","pushed_at":"2016-12-19T21:26:21Z","git_url":"git://github.com/endlessm/eos-knowledge-lib.git","ssh_url":"git@github.com:endlessm/eos-knowledge-lib.git","clone_url":"https://github.com/endlessm/eos-knowledge-lib.git","svn_url":"https://github.com/endlessm/eos-knowledge-lib","homepage":null,"size":24688,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1294"},"html":{"href":"https://github.com/endlessm/eos-knowledge-lib/pull/1294"},"issue":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/1294"},"comments":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/issues/1294/comments"},"review_comments":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1294/comments"},"review_comment":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/pulls/1294/commits"},"statuses":{"href":"https://api.github.com/repos/endlessm/eos-knowledge-lib/statuses/00c83591f73d74a1f180ab82400a6448b0fe8f1a"}}}}
{"actor":{"display_login":"mattdangerw"}}