{"action":"created","issue":{"url":"https://api.github.com/repos/bndtools/bnd/issues/2039","repository_url":"https://api.github.com/repos/bndtools/bnd","labels_url":"https://api.github.com/repos/bndtools/bnd/issues/2039/labels{/name}","comments_url":"https://api.github.com/repos/bndtools/bnd/issues/2039/comments","events_url":"https://api.github.com/repos/bndtools/bnd/issues/2039/events","html_url":"https://github.com/bndtools/bnd/pull/2039","id":228067518,"number":2039,"title":"Support DynamicImport-Package expansion (issue #2038)","user":{"login":"magnet","id":67098,"avatar_url":"https://avatars3.githubusercontent.com/u/67098?v=3","gravatar_id":"","url":"https://api.github.com/users/magnet","html_url":"https://github.com/magnet","followers_url":"https://api.github.com/users/magnet/followers","following_url":"https://api.github.com/users/magnet/following{/other_user}","gists_url":"https://api.github.com/users/magnet/gists{/gist_id}","starred_url":"https://api.github.com/users/magnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnet/subscriptions","organizations_url":"https://api.github.com/users/magnet/orgs","repos_url":"https://api.github.com/users/magnet/repos","events_url":"https://api.github.com/users/magnet/events{/privacy}","received_events_url":"https://api.github.com/users/magnet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-11T17:35:24Z","updated_at":"2017-05-12T16:04:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bndtools/bnd/pulls/2039","html_url":"https://github.com/bndtools/bnd/pull/2039","diff_url":"https://github.com/bndtools/bnd/pull/2039.diff","patch_url":"https://github.com/bndtools/bnd/pull/2039.patch"},"body":"Packages in Import-Package marked with resolution:=dynamic will be moved to the DynamicImport-Package entry after expansion takes place.\r\n\r\nThe test demonstrates packages get their version attribute added and are properly expanded, and moved to DynamicImport-Package (added after the existing instruction, and removed from Import-Package), and that other imported packages are not affected.\r\n\r\nI see no regression risk unless someone used resolution:=dynamic in an existing build... but then again, as far as I know the directive \"resolution\" is reserved by the OSGi spec."},"comment":{"url":"https://api.github.com/repos/bndtools/bnd/issues/comments/301117681","html_url":"https://github.com/bndtools/bnd/pull/2039#issuecomment-301117681","issue_url":"https://api.github.com/repos/bndtools/bnd/issues/2039","id":301117681,"user":{"login":"magnet","id":67098,"avatar_url":"https://avatars3.githubusercontent.com/u/67098?v=3","gravatar_id":"","url":"https://api.github.com/users/magnet","html_url":"https://github.com/magnet","followers_url":"https://api.github.com/users/magnet/followers","following_url":"https://api.github.com/users/magnet/following{/other_user}","gists_url":"https://api.github.com/users/magnet/gists{/gist_id}","starred_url":"https://api.github.com/users/magnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnet/subscriptions","organizations_url":"https://api.github.com/users/magnet/orgs","repos_url":"https://api.github.com/users/magnet/repos","events_url":"https://api.github.com/users/magnet/events{/privacy}","received_events_url":"https://api.github.com/users/magnet/received_events","type":"User","site_admin":false},"created_at":"2017-05-12T16:04:13Z","updated_at":"2017-05-12T16:04:13Z","body":"@bjhargrave I applied changes you suggested.\r\nI divide regular Import-Packages from DynamicImport-Packages using a method. It returns a Pair<Packages, Parameter> where first is the (filtered) Import-Packages, and Parameter is the header for the Dynamic-ImportPackage entry. I can't make it a Packages instance because it contains the original DIP header which may contain invalid packages (e.g containing wildcard) and they are not PackageRefs.\r\n\r\nI use the same (existing) code pattern to add Import-Packages and Dynamic-ImportPackages.\r\n\r\nI added an extra testcase when there's no DIP header present and rebased the PR on HEAD."}}
{"actor":{"display_login":"magnet"}}