{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/dune/issues/1255","repository_url":"https://api.github.com/repos/ocaml/dune","labels_url":"https://api.github.com/repos/ocaml/dune/issues/1255/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/dune/issues/1255/comments","events_url":"https://api.github.com/repos/ocaml/dune/issues/1255/events","html_url":"https://github.com/ocaml/dune/pull/1255","id":359434830,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0OTI1MjA0","number":1255,"title":"Fix main module name handling for variants","user":{"login":"rgrinberg","id":139003,"node_id":"MDQ6VXNlcjEzOTAwMw==","avatar_url":"https://avatars3.githubusercontent.com/u/139003?v=4","gravatar_id":"","url":"https://api.github.com/users/rgrinberg","html_url":"https://github.com/rgrinberg","followers_url":"https://api.github.com/users/rgrinberg/followers","following_url":"https://api.github.com/users/rgrinberg/following{/other_user}","gists_url":"https://api.github.com/users/rgrinberg/gists{/gist_id}","starred_url":"https://api.github.com/users/rgrinberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgrinberg/subscriptions","organizations_url":"https://api.github.com/users/rgrinberg/orgs","repos_url":"https://api.github.com/users/rgrinberg/repos","events_url":"https://api.github.com/users/rgrinberg/events{/privacy}","received_events_url":"https://api.github.com/users/rgrinberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-09-12T11:21:12Z","updated_at":"2018-09-13T12:13:14Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/ocaml/dune/pulls/1255","html_url":"https://github.com/ocaml/dune/pull/1255","diff_url":"https://github.com/ocaml/dune/pull/1255.diff","patch_url":"https://github.com/ocaml/dune/pull/1255.patch"},"body":"* the main module name should be inherited for implementations of virtual libraries\r\n* main module name should be optional as it isn't present for unwrapped libraries\r\n\r\n`Library_modules.t` still isn't looking ideal. `alias_module` and `main_module_name` should both be either present or absent. I can introduce a type like:\r\n\r\n```\r\nmodule Library_module : sig\r\n  module Wrapped : sig\r\n    type t =\r\n      { module_ : \r\n      }\r\n  end\r\n  type t =\r\n    { ..\r\n    ; wrapped : Wrapped.t option\r\n    }\r\nend \r\n```\r\n\r\nto reflect this property. Also, `Library_module.make` should be split to handle the wrapped and unwrapped cases separately. This would make things a lot cleaner I think."},"comment":{"url":"https://api.github.com/repos/ocaml/dune/issues/comments/420984899","html_url":"https://github.com/ocaml/dune/pull/1255#issuecomment-420984899","issue_url":"https://api.github.com/repos/ocaml/dune/issues/1255","id":420984899,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDk4NDg5OQ==","user":{"login":"diml","id":1251584,"node_id":"MDQ6VXNlcjEyNTE1ODQ=","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},"created_at":"2018-09-13T12:13:14Z","updated_at":"2018-09-13T12:13:14Z","author_association":"MEMBER","body":"That's the idea. Basically, if you need to access the library database to compute `Lib_modules.t`, then whenever the libdb changes you need to recompute all the `Lib_modules.t`. If we only store a symbolic value in `Lib_modules.t` and let the caller resolve it, then we don't need to recompute the `Lib_modules.t` when the libdb changes."}}
{"actor":{"display_login":"diml"}}