{"action":"created","issue":{"url":"https://api.github.com/repos/dlang/dub/issues/997","repository_url":"https://api.github.com/repos/dlang/dub","labels_url":"https://api.github.com/repos/dlang/dub/issues/997/labels{/name}","comments_url":"https://api.github.com/repos/dlang/dub/issues/997/comments","events_url":"https://api.github.com/repos/dlang/dub/issues/997/events","html_url":"https://github.com/dlang/dub/issues/997","id":190063174,"number":997,"title":"Optional dependencies are sticky and that is bad","user":{"login":"John-Colvin","id":1867189,"avatar_url":"https://avatars.githubusercontent.com/u/1867189?v=3","gravatar_id":"","url":"https://api.github.com/users/John-Colvin","html_url":"https://github.com/John-Colvin","followers_url":"https://api.github.com/users/John-Colvin/followers","following_url":"https://api.github.com/users/John-Colvin/following{/other_user}","gists_url":"https://api.github.com/users/John-Colvin/gists{/gist_id}","starred_url":"https://api.github.com/users/John-Colvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/John-Colvin/subscriptions","organizations_url":"https://api.github.com/users/John-Colvin/orgs","repos_url":"https://api.github.com/users/John-Colvin/repos","events_url":"https://api.github.com/users/John-Colvin/events{/privacy}","received_events_url":"https://api.github.com/users/John-Colvin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-17T14:32:48Z","updated_at":"2016-12-07T17:03:09Z","closed_at":null,"body":"It introduces a strange \"action at a distance\" effect.\r\n\r\nE.g.\r\n\r\nA optionally depends on B\r\nC depends on A only\r\nD depends on A and B\r\n\r\nImagine C and D are entirely unrelated projects\\*. If you build C first, it will not include B. If you build D first and then build C, *C will include and depend on B*.\r\n\r\nThis is a pretty crazy situation. I suggest it is a symptom of using by-default auto-generated files (`dub.selections.json`) as also user-customisable, which is fine for the \"root\" package but creates a nightmare when a package is part of 2 independent dependency chains.\\*\\*\r\n\r\n\\*perhaps even belonging to different users if A is system installed!\r\n\r\n\\*\\* I think the fundamental difficulty is that you can't tell the difference between user settings that must be obeyed and auto-generated ones that could need to be different depending on all sorts of other things."},"comment":{"url":"https://api.github.com/repos/dlang/dub/issues/comments/265506154","html_url":"https://github.com/dlang/dub/issues/997#issuecomment-265506154","issue_url":"https://api.github.com/repos/dlang/dub/issues/997","id":265506154,"user":{"login":"s-ludwig","id":1645969,"avatar_url":"https://avatars.githubusercontent.com/u/1645969?v=3","gravatar_id":"","url":"https://api.github.com/users/s-ludwig","html_url":"https://github.com/s-ludwig","followers_url":"https://api.github.com/users/s-ludwig/followers","following_url":"https://api.github.com/users/s-ludwig/following{/other_user}","gists_url":"https://api.github.com/users/s-ludwig/gists{/gist_id}","starred_url":"https://api.github.com/users/s-ludwig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-ludwig/subscriptions","organizations_url":"https://api.github.com/users/s-ludwig/orgs","repos_url":"https://api.github.com/users/s-ludwig/repos","events_url":"https://api.github.com/users/s-ludwig/events{/privacy}","received_events_url":"https://api.github.com/users/s-ludwig/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T17:03:09Z","updated_at":"2016-12-07T17:03:09Z","body":"Perhaps I'm misunderstanding something, but dub.selections.json only has an effect for the root package. This means that building D first will generally not change the fact that building C alone won't include B.\r\n\r\nThere is a big \"however\", though: All sub packages currently share the same dub.selections.json file with their base package, which violates the principle that they should generally behave like individual packages. Is it possible that this is what you stumbled over?"}}
{"actor":{"display_login":"s-ludwig"}}