{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter-intellij/issues/2015","repository_url":"https://api.github.com/repos/flutter/flutter-intellij","labels_url":"https://api.github.com/repos/flutter/flutter-intellij/issues/2015/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter-intellij/issues/2015/comments","events_url":"https://api.github.com/repos/flutter/flutter-intellij/issues/2015/events","html_url":"https://github.com/flutter/flutter-intellij/issues/2015","id":308986143,"number":2015,"title":"Generates relative instead of package path when importing files under project's lib/ directory","user":{"login":"tamcy","id":959433,"avatar_url":"https://avatars0.githubusercontent.com/u/959433?v=4","gravatar_id":"","url":"https://api.github.com/users/tamcy","html_url":"https://github.com/tamcy","followers_url":"https://api.github.com/users/tamcy/followers","following_url":"https://api.github.com/users/tamcy/following{/other_user}","gists_url":"https://api.github.com/users/tamcy/gists{/gist_id}","starred_url":"https://api.github.com/users/tamcy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamcy/subscriptions","organizations_url":"https://api.github.com/users/tamcy/orgs","repos_url":"https://api.github.com/users/tamcy/repos","events_url":"https://api.github.com/users/tamcy/events{/privacy}","received_events_url":"https://api.github.com/users/tamcy/received_events","type":"User","site_admin":false},"labels":[{"id":470934624,"url":"https://api.github.com/repos/flutter/flutter-intellij/labels/completion","name":"completion","color":"f9d0c4","default":false},{"id":429647505,"url":"https://api.github.com/repos/flutter/flutter-intellij/labels/usability","name":"usability","color":"f9d0c4","default":false}],"state":"open","locked":false,"assignee":{"login":"pq","id":67586,"avatar_url":"https://avatars3.githubusercontent.com/u/67586?v=4","gravatar_id":"","url":"https://api.github.com/users/pq","html_url":"https://github.com/pq","followers_url":"https://api.github.com/users/pq/followers","following_url":"https://api.github.com/users/pq/following{/other_user}","gists_url":"https://api.github.com/users/pq/gists{/gist_id}","starred_url":"https://api.github.com/users/pq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pq/subscriptions","organizations_url":"https://api.github.com/users/pq/orgs","repos_url":"https://api.github.com/users/pq/repos","events_url":"https://api.github.com/users/pq/events{/privacy}","received_events_url":"https://api.github.com/users/pq/received_events","type":"User","site_admin":false},"assignees":[{"login":"pq","id":67586,"avatar_url":"https://avatars3.githubusercontent.com/u/67586?v=4","gravatar_id":"","url":"https://api.github.com/users/pq","html_url":"https://github.com/pq","followers_url":"https://api.github.com/users/pq/followers","following_url":"https://api.github.com/users/pq/following{/other_user}","gists_url":"https://api.github.com/users/pq/gists{/gist_id}","starred_url":"https://api.github.com/users/pq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pq/subscriptions","organizations_url":"https://api.github.com/users/pq/orgs","repos_url":"https://api.github.com/users/pq/repos","events_url":"https://api.github.com/users/pq/events{/privacy}","received_events_url":"https://api.github.com/users/pq/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/flutter/flutter-intellij/milestones/11","html_url":"https://github.com/flutter/flutter-intellij/milestone/11","labels_url":"https://api.github.com/repos/flutter/flutter-intellij/milestones/11/labels","id":2110124,"number":11,"title":"On Deck","description":"Issues under consideration for upcoming milestones. ","creator":{"login":"pq","id":67586,"avatar_url":"https://avatars3.githubusercontent.com/u/67586?v=4","gravatar_id":"","url":"https://api.github.com/users/pq","html_url":"https://github.com/pq","followers_url":"https://api.github.com/users/pq/followers","following_url":"https://api.github.com/users/pq/following{/other_user}","gists_url":"https://api.github.com/users/pq/gists{/gist_id}","starred_url":"https://api.github.com/users/pq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pq/subscriptions","organizations_url":"https://api.github.com/users/pq/orgs","repos_url":"https://api.github.com/users/pq/repos","events_url":"https://api.github.com/users/pq/events{/privacy}","received_events_url":"https://api.github.com/users/pq/received_events","type":"User","site_admin":false},"open_issues":32,"closed_issues":95,"state":"open","created_at":"2016-11-02T16:50:37Z","updated_at":"2018-03-27T18:33:52Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2018-03-27T14:10:42Z","updated_at":"2018-03-27T19:48:09Z","closed_at":null,"author_association":"NONE","body":"When using code completion to generate codes of missing file import, the plugin always generates a `package:` style import, even when importing from within our own package. But this can break things as [\"main.dart\" is imported relatively, not as a package](https://groups.google.com/d/msg/flutter-dev/4RSZlcp3x_E/n4k7xEgJCQAJ). It'd be better if relative path syntax is used."},"comment":{"url":"https://api.github.com/repos/flutter/flutter-intellij/issues/comments/376651707","html_url":"https://github.com/flutter/flutter-intellij/issues/2015#issuecomment-376651707","issue_url":"https://api.github.com/repos/flutter/flutter-intellij/issues/2015","id":376651707,"user":{"login":"pq","id":67586,"avatar_url":"https://avatars3.githubusercontent.com/u/67586?v=4","gravatar_id":"","url":"https://api.github.com/users/pq","html_url":"https://github.com/pq","followers_url":"https://api.github.com/users/pq/followers","following_url":"https://api.github.com/users/pq/following{/other_user}","gists_url":"https://api.github.com/users/pq/gists{/gist_id}","starred_url":"https://api.github.com/users/pq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pq/subscriptions","organizations_url":"https://api.github.com/users/pq/orgs","repos_url":"https://api.github.com/users/pq/repos","events_url":"https://api.github.com/users/pq/events{/privacy}","received_events_url":"https://api.github.com/users/pq/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T19:48:09Z","updated_at":"2018-03-27T19:48:09Z","author_association":"COLLABORATOR","body":"I think the general rule is that if you use relative imports, all your imports should be relative, otherwise all should be absolute.  Problems arise when there's a mix.   In practice, I think @zoechi's advise is spot on.  FWIW, if you want the linter to keep you on the rails, you might consider enabling [`avoid_relative_lib_imports`](http://dart-lang.github.io/linter/lints/avoid_relative_lib_imports.html)...\r\n\r\ncc @bwilkerson, in case he wants to chime in."}}
{"actor":{"display_login":"pq"}}