{"action":"created","issue":{"url":"https://api.github.com/repos/fedora-modularity/libmodulemd/issues/13","repository_url":"https://api.github.com/repos/fedora-modularity/libmodulemd","labels_url":"https://api.github.com/repos/fedora-modularity/libmodulemd/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/fedora-modularity/libmodulemd/issues/13/comments","events_url":"https://api.github.com/repos/fedora-modularity/libmodulemd/issues/13/events","html_url":"https://github.com/fedora-modularity/libmodulemd/issues/13","id":299905159,"number":13,"title":"Why does `modulemd_module_get_dependencies` return an array?","user":{"login":"mprahl","id":11711106,"avatar_url":"https://avatars3.githubusercontent.com/u/11711106?v=4","gravatar_id":"","url":"https://api.github.com/users/mprahl","html_url":"https://github.com/mprahl","followers_url":"https://api.github.com/users/mprahl/followers","following_url":"https://api.github.com/users/mprahl/following{/other_user}","gists_url":"https://api.github.com/users/mprahl/gists{/gist_id}","starred_url":"https://api.github.com/users/mprahl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mprahl/subscriptions","organizations_url":"https://api.github.com/users/mprahl/orgs","repos_url":"https://api.github.com/users/mprahl/repos","events_url":"https://api.github.com/users/mprahl/events{/privacy}","received_events_url":"https://api.github.com/users/mprahl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-24T02:57:07Z","updated_at":"2018-02-26T01:18:01Z","closed_at":"2018-02-26T01:18:01Z","author_association":"NONE","body":"I'm working on porting MBS to libmodulemd and noticed that when running `mmd.get_dependencies()` on a v2 modulemd (became v2 via upgrade), I seem to always get a list with one element, no matter how many requires or buildrequires the modulemd specifies. To actually get those requires and buildrequires, I have to run `mmd.get_dependencies()[0].get_requires()` and  `mmd.get_dependencies()[0].get_buildrequires()`. These functions return a dictionary with all the dependencies in the modulemd.\r\n\r\nSo with that said, what circumstance causes `mmd.get_dependencies()` to return a list that is larger than one element? I would have expected that `mmd.get_dependencies()` would return a `ModulemdDependencies` directly instead of this one element list."},"comment":{"url":"https://api.github.com/repos/fedora-modularity/libmodulemd/issues/comments/368364311","html_url":"https://github.com/fedora-modularity/libmodulemd/issues/13#issuecomment-368364311","issue_url":"https://api.github.com/repos/fedora-modularity/libmodulemd/issues/13","id":368364311,"user":{"login":"sgallagher","id":739555,"avatar_url":"https://avatars0.githubusercontent.com/u/739555?v=4","gravatar_id":"","url":"https://api.github.com/users/sgallagher","html_url":"https://github.com/sgallagher","followers_url":"https://api.github.com/users/sgallagher/followers","following_url":"https://api.github.com/users/sgallagher/following{/other_user}","gists_url":"https://api.github.com/users/sgallagher/gists{/gist_id}","starred_url":"https://api.github.com/users/sgallagher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgallagher/subscriptions","organizations_url":"https://api.github.com/users/sgallagher/orgs","repos_url":"https://api.github.com/users/sgallagher/repos","events_url":"https://api.github.com/users/sgallagher/events{/privacy}","received_events_url":"https://api.github.com/users/sgallagher/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T01:18:01Z","updated_at":"2018-02-26T01:18:01Z","author_association":"COLLABORATOR","body":"The [v2 format](https://github.com/fedora-modularity/libmodulemd/blob/master/spec.v2.yaml#L78) specifically requires that dependencies are a list in order to support stream expansion. However, in the specific case of an upgrade from a v1 file, you will always have a list of only one value because the v1 format could only handle a single one (hence the need for the backwards-incompatible change to v2).\r\n\r\nSee https://github.com/fedora-modularity/libmodulemd/blob/master/spec.v2.yaml#L78 for details on how this list will need to be parsed.\r\n"}}
{"actor":{"display_login":"sgallagher"}}