{"action":"created","issue":{"url":"https://api.github.com/repos/microprofile/microprofile-config/issues/13","repository_url":"https://api.github.com/repos/microprofile/microprofile-config","labels_url":"https://api.github.com/repos/microprofile/microprofile-config/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/microprofile/microprofile-config/issues/13/comments","events_url":"https://api.github.com/repos/microprofile/microprofile-config/issues/13/events","html_url":"https://github.com/microprofile/microprofile-config/issues/13","id":201228388,"number":13,"title":"ConfigProvider contextuality is wrong","user":{"login":"rmannibucau","id":1249546,"avatar_url":"https://avatars.githubusercontent.com/u/1249546?v=3","gravatar_id":"","url":"https://api.github.com/users/rmannibucau","html_url":"https://github.com/rmannibucau","followers_url":"https://api.github.com/users/rmannibucau/followers","following_url":"https://api.github.com/users/rmannibucau/following{/other_user}","gists_url":"https://api.github.com/users/rmannibucau/gists{/gist_id}","starred_url":"https://api.github.com/users/rmannibucau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmannibucau/subscriptions","organizations_url":"https://api.github.com/users/rmannibucau/orgs","repos_url":"https://api.github.com/users/rmannibucau/repos","events_url":"https://api.github.com/users/rmannibucau/events{/privacy}","received_events_url":"https://api.github.com/users/rmannibucau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-01-17T10:07:09Z","updated_at":"2017-01-17T16:01:52Z","closed_at":null,"body":"ConfigProvider has 1 big issues in the current design:\r\n\r\n-> it handles the lookup which is wrong, in particular in the microprofile context which has CDI has a strong backbone\r\n\r\nAlso note that - assuming it is a valid design - it assumes there is a context which is a classloader which is wrong in several java applications so key should be generic probably (interface with only hashCode() and equals()?)\r\n\r\nConcretely the config API should just allow to:\r\n1. build a config (with sources, converters, accessors, autoloaded from SPI or manually built for libraries for instance)\r\n2. provide a default config instance in CDI context (@ApplicationScoped)\r\n3. if considered relevant provide a bootstrap config (the default one) to let configure bootstrap components like CDI extensions (this can require some CDI work to ensure it is not hacky but technically there is no blocker, in particular in microprofile context)\r\n\r\nIn short: there is no point but drawbacks to re-implement what CDI already does which is the contextuality of an instance (Config there).\r\n\r\nTo make it more obvious: this issue is about removing any contextuality/lookup feature from the config project and let it be part of the container/IoC integration only."},"comment":{"url":"https://api.github.com/repos/microprofile/microprofile-config/issues/comments/273211719","html_url":"https://github.com/microprofile/microprofile-config/issues/13#issuecomment-273211719","issue_url":"https://api.github.com/repos/microprofile/microprofile-config/issues/13","id":273211719,"user":{"login":"Emily-Jiang","id":10999780,"avatar_url":"https://avatars.githubusercontent.com/u/10999780?v=3","gravatar_id":"","url":"https://api.github.com/users/Emily-Jiang","html_url":"https://github.com/Emily-Jiang","followers_url":"https://api.github.com/users/Emily-Jiang/followers","following_url":"https://api.github.com/users/Emily-Jiang/following{/other_user}","gists_url":"https://api.github.com/users/Emily-Jiang/gists{/gist_id}","starred_url":"https://api.github.com/users/Emily-Jiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emily-Jiang/subscriptions","organizations_url":"https://api.github.com/users/Emily-Jiang/orgs","repos_url":"https://api.github.com/users/Emily-Jiang/repos","events_url":"https://api.github.com/users/Emily-Jiang/events{/privacy}","received_events_url":"https://api.github.com/users/Emily-Jiang/received_events","type":"User","site_admin":false},"created_at":"2017-01-17T16:01:52Z","updated_at":"2017-01-17T16:01:52Z","body":"@rmannibucau misunderstood what you meant. Do you mean the ConfigProvider should not expose the following method:\r\npublic static Config getConfig(ClassLoader cl)?\r\n\r\nIn OSGi, it should go through CDI?\r\n"}}
{"actor":{"display_login":"Emily-Jiang"}}