{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/27705","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/27705/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/27705/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/27705/events","html_url":"https://github.com/rust-lang/rust/issues/27705","id":100594545,"number":27705,"title":"Tracking issue for DNS in std::net","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"labels":[{"id":246778137,"url":"https://api.github.com/repos/rust-lang/rust/labels/B-unstable","name":"B-unstable","color":"e102d8","default":false},{"id":650846969,"url":"https://api.github.com/repos/rust-lang/rust/labels/C-tracking-issue","name":"C-tracking-issue","color":"f5f1fd","default":false},{"id":638321554,"url":"https://api.github.com/repos/rust-lang/rust/labels/proposed-final-comment-period","name":"proposed-final-comment-period","color":"ededed","default":false},{"id":211668062,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-libs","name":"T-libs","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":28,"created_at":"2015-08-12T17:31:16Z","updated_at":"2017-08-29T22:34:40Z","closed_at":null,"author_association":"OWNER","body":"This is a tracking issue for the `lookup_addr` and `lookup_host` unstable features in the standard library. These are currently the only exposed support for DNS as a public interface. Functions like `TcpStream::connect` already expose the ability to resolve names via passing a string, but this cannot be done programmatically currently.\n\nThere are a number of thorny issues to deal with here:\n- Is calling `getaddrinfo` and `getnameinfo` here appropriate?\n- What should the arguments be? Should this use a builder? \n- In the `getaddrinfo` case, should IP addresses or socket addresses be returned?\n- In the `getnameinfo` case, should IP addresses or socket addresses be taken?\n- What should the return values look like? Iterators? Structs exposing accessors? (like `DirEntry`)\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/325823987","html_url":"https://github.com/rust-lang/rust/issues/27705#issuecomment-325823987","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/27705","id":325823987,"user":{"login":"dimbleby","id":875184,"avatar_url":"https://avatars3.githubusercontent.com/u/875184?v=4","gravatar_id":"","url":"https://api.github.com/users/dimbleby","html_url":"https://github.com/dimbleby","followers_url":"https://api.github.com/users/dimbleby/followers","following_url":"https://api.github.com/users/dimbleby/following{/other_user}","gists_url":"https://api.github.com/users/dimbleby/gists{/gist_id}","starred_url":"https://api.github.com/users/dimbleby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimbleby/subscriptions","organizations_url":"https://api.github.com/users/dimbleby/orgs","repos_url":"https://api.github.com/users/dimbleby/repos","events_url":"https://api.github.com/users/dimbleby/events{/privacy}","received_events_url":"https://api.github.com/users/dimbleby/received_events","type":"User","site_admin":false},"created_at":"2017-08-29T22:34:40Z","updated_at":"2017-08-29T22:34:40Z","author_association":"NONE","body":"> The story here is pretty clearly settled: you can use the ToSocketAddr trait to convert from a string to get basic DNS. Full-blown DNS should live outside of std.\r\n\r\nI see two possible justifications for settling for this: one disappointing-but-reasonable, one surely wrong.  I'd like to check which (if either) we have in mind when closing this.\r\n\r\nThe 'disappointing-but-reasonable' position is: well, that's where we are.  It's true that the `ToSocketAddr` backdoor is unsatisfactory but we can't remove it because back-compatibility, so let's at least not make things worse.\r\n\r\nThe 'surely wrong' position is: this is actually where we'd want to be, and all is well with the world.  The current `ToSocketAddrs` trait is a good API for DNS resolution and totally deserves its place as the unique way to do DNS resolution in `std`.\r\n\r\nI suspect that the first position is what is being proposed, in which case fair enough.  But if it's the second, please leave a note so that I can come back and say why I think that's surely wrong and should be revisited!"}}
{"actor":{"display_login":"dimbleby"}}