{"action":"created","comment":{"url":"https://api.github.com/repos/ocaml/dune/pulls/comments/169280694","pull_request_review_id":97778888,"id":169280694,"diff_hunk":"@@ -157,19 +157,37 @@ let css_file ~doc_dir = doc_dir ++ \"odoc.css\"\n \n let toplevel_index ~doc_dir = doc_dir ++ \"index.html\"\n \n-let setup_library_rules sctx (lib : Library.t) ~dir ~modules ~mld_files\n+let setup_library_rules sctx (lib : Library.t) ~dir ~scope ~modules ~mld_files\n       ~requires ~(dep_graphs:Ocamldep.Dep_graph.t Ml_kind.Dict.t) =\n-  let doc_dir = SC.Doc.dir sctx (dir, lib) in\n-  let obj_dir = Lib.lib_obj_dir dir lib in\n-  let lib_unique_name = SC.unique_library_name sctx (Lib.internal (dir, lib)) in\n+  let doc_dir = SC.Doc.dir sctx lib in\n+  let obj_dir, lib_unique_name =\n+    match Lib.DB.find (Scope.libs scope) lib.name with\n+    | Error Not_found -> assert false\n+    | Error (Hidden _) ->\n+      (Utils.library_object_directory ~dir lib.name,","path":"src/odoc.ml","position":33,"original_position":33,"commit_id":"c0f1eec8243db03fad492988cc83ee6ac05e0453","original_commit_id":"c0f1eec8243db03fad492988cc83ee6ac05e0453","user":{"login":"diml","id":1251584,"avatar_url":"https://avatars1.githubusercontent.com/u/1251584?v=4","gravatar_id":"","url":"https://api.github.com/users/diml","html_url":"https://github.com/diml","followers_url":"https://api.github.com/users/diml/followers","following_url":"https://api.github.com/users/diml/following{/other_user}","gists_url":"https://api.github.com/users/diml/gists{/gist_id}","starred_url":"https://api.github.com/users/diml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diml/subscriptions","organizations_url":"https://api.github.com/users/diml/orgs","repos_url":"https://api.github.com/users/diml/repos","events_url":"https://api.github.com/users/diml/events{/privacy}","received_events_url":"https://api.github.com/users/diml/received_events","type":"User","site_admin":false},"body":"It's for libraries that are optional with unavailable dependencies.\r\n\r\n> Also, it's still unsatisfying to go outside of the lib interface to get the object dir in that case.\r\n\r\nIndeed. I suppose we could keep the `Info.t` in this case","created_at":"2018-02-20T10:48:18Z","updated_at":"2018-02-20T10:48:18Z","html_url":"https://github.com/ocaml/dune/pull/516#discussion_r169280694","pull_request_url":"https://api.github.com/repos/ocaml/dune/pulls/516","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ocaml/dune/pulls/comments/169280694"},"html":{"href":"https://github.com/ocaml/dune/pull/516#discussion_r169280694"},"pull_request":{"href":"https://api.github.com/repos/ocaml/dune/pulls/516"}},"in_reply_to_id":169233810},"pull_request":{"url":"https://api.github.com/repos/ocaml/dune/pulls/516","id":169159003,"html_url":"https://github.com/ocaml/dune/pull/516","diff_url":"https://github.com/ocaml/dune/pull/516.diff","patch_url":"https://github.com/ocaml/dune/pull/516.patch","issue_url":"https://api.github.com/repos/ocaml/dune/issues/516","number":516,"state":"open","locked":false,"title":"Refactor library management","user":{"login":"diml","id":1251584,"avatar_url":"https://avatars1.githubusercontent.com/u/1251584?v=4","gravatar_id":"","url":"https://api.github.com/users/diml","html_url":"https://github.com/diml","followers_url":"https://api.github.com/users/diml/followers","following_url":"https://api.github.com/users/diml/following{/other_user}","gists_url":"https://api.github.com/users/diml/gists{/gist_id}","starred_url":"https://api.github.com/users/diml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diml/subscriptions","organizations_url":"https://api.github.com/users/diml/orgs","repos_url":"https://api.github.com/users/diml/repos","events_url":"https://api.github.com/users/diml/events{/privacy}","received_events_url":"https://api.github.com/users/diml/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-14T16:32:19Z","updated_at":"2018-02-20T10:48:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54dfe20c2b65d1b5007c897f2fbd7f0b548ec7cb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ocaml/dune/pulls/516/commits","review_comments_url":"https://api.github.com/repos/ocaml/dune/pulls/516/comments","review_comment_url":"https://api.github.com/repos/ocaml/dune/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ocaml/dune/issues/516/comments","statuses_url":"https://api.github.com/repos/ocaml/dune/statuses/c0f1eec8243db03fad492988cc83ee6ac05e0453","head":{"label":"ocaml:refactor-lib-management","ref":"refactor-lib-management","sha":"c0f1eec8243db03fad492988cc83ee6ac05e0453","user":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars3.githubusercontent.com/u/1841483?v=4","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"repo":{"id":72368050,"name":"dune","full_name":"ocaml/dune","owner":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars3.githubusercontent.com/u/1841483?v=4","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ocaml/dune","description":"A composable build system for OCaml","fork":false,"url":"https://api.github.com/repos/ocaml/dune","forks_url":"https://api.github.com/repos/ocaml/dune/forks","keys_url":"https://api.github.com/repos/ocaml/dune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocaml/dune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocaml/dune/teams","hooks_url":"https://api.github.com/repos/ocaml/dune/hooks","issue_events_url":"https://api.github.com/repos/ocaml/dune/issues/events{/number}","events_url":"https://api.github.com/repos/ocaml/dune/events","assignees_url":"https://api.github.com/repos/ocaml/dune/assignees{/user}","branches_url":"https://api.github.com/repos/ocaml/dune/branches{/branch}","tags_url":"https://api.github.com/repos/ocaml/dune/tags","blobs_url":"https://api.github.com/repos/ocaml/dune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocaml/dune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocaml/dune/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocaml/dune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocaml/dune/statuses/{sha}","languages_url":"https://api.github.com/repos/ocaml/dune/languages","stargazers_url":"https://api.github.com/repos/ocaml/dune/stargazers","contributors_url":"https://api.github.com/repos/ocaml/dune/contributors","subscribers_url":"https://api.github.com/repos/ocaml/dune/subscribers","subscription_url":"https://api.github.com/repos/ocaml/dune/subscription","commits_url":"https://api.github.com/repos/ocaml/dune/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocaml/dune/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocaml/dune/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocaml/dune/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocaml/dune/contents/{+path}","compare_url":"https://api.github.com/repos/ocaml/dune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocaml/dune/merges","archive_url":"https://api.github.com/repos/ocaml/dune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocaml/dune/downloads","issues_url":"https://api.github.com/repos/ocaml/dune/issues{/number}","pulls_url":"https://api.github.com/repos/ocaml/dune/pulls{/number}","milestones_url":"https://api.github.com/repos/ocaml/dune/milestones{/number}","notifications_url":"https://api.github.com/repos/ocaml/dune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocaml/dune/labels{/name}","releases_url":"https://api.github.com/repos/ocaml/dune/releases{/id}","deployments_url":"https://api.github.com/repos/ocaml/dune/deployments","created_at":"2016-10-30T18:42:23Z","updated_at":"2018-02-17T15:33:44Z","pushed_at":"2018-02-20T04:50:41Z","git_url":"git://github.com/ocaml/dune.git","ssh_url":"git@github.com:ocaml/dune.git","clone_url":"https://github.com/ocaml/dune.git","svn_url":"https://github.com/ocaml/dune","homepage":"","size":2693,"stargazers_count":274,"watchers_count":274,"language":"OCaml","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":116,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":55,"open_issues":116,"watchers":274,"default_branch":"master"}},"base":{"label":"ocaml:master","ref":"master","sha":"02abc3ca6e8552d95a0ead5f2e6eeef21da08c35","user":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars3.githubusercontent.com/u/1841483?v=4","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"repo":{"id":72368050,"name":"dune","full_name":"ocaml/dune","owner":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars3.githubusercontent.com/u/1841483?v=4","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ocaml/dune","description":"A composable build system for OCaml","fork":false,"url":"https://api.github.com/repos/ocaml/dune","forks_url":"https://api.github.com/repos/ocaml/dune/forks","keys_url":"https://api.github.com/repos/ocaml/dune/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocaml/dune/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocaml/dune/teams","hooks_url":"https://api.github.com/repos/ocaml/dune/hooks","issue_events_url":"https://api.github.com/repos/ocaml/dune/issues/events{/number}","events_url":"https://api.github.com/repos/ocaml/dune/events","assignees_url":"https://api.github.com/repos/ocaml/dune/assignees{/user}","branches_url":"https://api.github.com/repos/ocaml/dune/branches{/branch}","tags_url":"https://api.github.com/repos/ocaml/dune/tags","blobs_url":"https://api.github.com/repos/ocaml/dune/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocaml/dune/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocaml/dune/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocaml/dune/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocaml/dune/statuses/{sha}","languages_url":"https://api.github.com/repos/ocaml/dune/languages","stargazers_url":"https://api.github.com/repos/ocaml/dune/stargazers","contributors_url":"https://api.github.com/repos/ocaml/dune/contributors","subscribers_url":"https://api.github.com/repos/ocaml/dune/subscribers","subscription_url":"https://api.github.com/repos/ocaml/dune/subscription","commits_url":"https://api.github.com/repos/ocaml/dune/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocaml/dune/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocaml/dune/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocaml/dune/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocaml/dune/contents/{+path}","compare_url":"https://api.github.com/repos/ocaml/dune/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocaml/dune/merges","archive_url":"https://api.github.com/repos/ocaml/dune/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocaml/dune/downloads","issues_url":"https://api.github.com/repos/ocaml/dune/issues{/number}","pulls_url":"https://api.github.com/repos/ocaml/dune/pulls{/number}","milestones_url":"https://api.github.com/repos/ocaml/dune/milestones{/number}","notifications_url":"https://api.github.com/repos/ocaml/dune/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocaml/dune/labels{/name}","releases_url":"https://api.github.com/repos/ocaml/dune/releases{/id}","deployments_url":"https://api.github.com/repos/ocaml/dune/deployments","created_at":"2016-10-30T18:42:23Z","updated_at":"2018-02-17T15:33:44Z","pushed_at":"2018-02-20T04:50:41Z","git_url":"git://github.com/ocaml/dune.git","ssh_url":"git@github.com:ocaml/dune.git","clone_url":"https://github.com/ocaml/dune.git","svn_url":"https://github.com/ocaml/dune","homepage":"","size":2693,"stargazers_count":274,"watchers_count":274,"language":"OCaml","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":116,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":55,"open_issues":116,"watchers":274,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ocaml/dune/pulls/516"},"html":{"href":"https://github.com/ocaml/dune/pull/516"},"issue":{"href":"https://api.github.com/repos/ocaml/dune/issues/516"},"comments":{"href":"https://api.github.com/repos/ocaml/dune/issues/516/comments"},"review_comments":{"href":"https://api.github.com/repos/ocaml/dune/pulls/516/comments"},"review_comment":{"href":"https://api.github.com/repos/ocaml/dune/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ocaml/dune/pulls/516/commits"},"statuses":{"href":"https://api.github.com/repos/ocaml/dune/statuses/c0f1eec8243db03fad492988cc83ee6ac05e0453"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"diml"}}