{"action":"created","issue":{"url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1062","repository_url":"https://api.github.com/repos/Manishearth/rust-clippy","labels_url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1062/labels{/name}","comments_url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1062/comments","events_url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1062/events","html_url":"https://github.com/Manishearth/rust-clippy/issues/1062","id":163064123,"number":1062,"title":"A lot of memory is required to compile Clippy","user":{"login":"shepmaster","id":174509,"avatar_url":"https://avatars.githubusercontent.com/u/174509?v=3","gravatar_id":"","url":"https://api.github.com/users/shepmaster","html_url":"https://github.com/shepmaster","followers_url":"https://api.github.com/users/shepmaster/followers","following_url":"https://api.github.com/users/shepmaster/following{/other_user}","gists_url":"https://api.github.com/users/shepmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/shepmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepmaster/subscriptions","organizations_url":"https://api.github.com/users/shepmaster/orgs","repos_url":"https://api.github.com/users/shepmaster/repos","events_url":"https://api.github.com/users/shepmaster/events{/privacy}","received_events_url":"https://api.github.com/users/shepmaster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-06-30T01:45:01Z","updated_at":"2016-08-04T04:17:48Z","closed_at":null,"body":"I'm attempting to add Clippy support to my implementation of the Rust Playground, but I'm unable to compile Clippy on the free tier of an Amazon EC2 instance (a little less than 1 GiB of RAM).\r\n\r\nThe last value from `ps` that I captured before the process was killed:\r\n\r\n```\r\nroot      8027 87.0 63.5 956676 647664 ?       Sl   01:39   0:13 /root/.multirust/toolchains/nightly-2016-06-24-x86_64-unknown-linux-gnu/bin/rustc root/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.77/src/lib.rs --crate-name clippy_lints --crate-type lib -C opt-level=3 -C metadata=44756caa45bd5b13 -C extra-filename=-44756caa45bd5b13 --out-dir /tmp/cargo-install.Np8ev9N0Fp6c/release/deps --emit=dep-info,link -L dependency=/tmp/cargo-install.Np8ev9N0Fp6c/release/deps -L dependency=/tmp/cargo-install.Np8ev9N0Fp6c/release/deps --extern regex_syntax=/tmp/cargo-install.Np8ev9N0Fp6c/release/deps/libregex_syntax-6ded9701a0454251.rlib --extern unicode_normalization=/tmp/cargo-install.Np8ev9N0Fp6c/release/deps/libunicode_normalization-5de3a9c8fd8ddf4e.rlib --extern matches=/tmp/cargo-install.Np8ev9N0Fp6c/release/deps/libmatches-5d5580ffd528031c.rlib --extern quine_mc_cluskey=/tmp/cargo-install.Np8ev9N0Fp6c/release/deps/libquine_mc_cluskey-bfa4946e33f51135.rlib --extern rustc_serialize=/tmp/cargo-install.Np8ev9N0Fp6c/release/deps/librustc_serialize-3561541d79c18212.rlib --extern toml=/tmp/cargo-install.Np8ev9N0Fp6c/release/deps/libtoml-1a75b37a708f335b.rlib --extern semver=/tmp/cargo-install.Np8ev9N0Fp6c/release/deps/libsemver-60d1aa0e68346373.rlib --cap-lints allow\r\n```\r\n\r\nAny suggestions on how reasonable it is to require 600+ MiB of RAM to compile that crate? Any ideas how to work around it?"},"comment":{"url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/comments/237448401","html_url":"https://github.com/Manishearth/rust-clippy/issues/1062#issuecomment-237448401","issue_url":"https://api.github.com/repos/Manishearth/rust-clippy/issues/1062","id":237448401,"user":{"login":"Manishearth","id":1617736,"avatar_url":"https://avatars.githubusercontent.com/u/1617736?v=3","gravatar_id":"","url":"https://api.github.com/users/Manishearth","html_url":"https://github.com/Manishearth","followers_url":"https://api.github.com/users/Manishearth/followers","following_url":"https://api.github.com/users/Manishearth/following{/other_user}","gists_url":"https://api.github.com/users/Manishearth/gists{/gist_id}","starred_url":"https://api.github.com/users/Manishearth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Manishearth/subscriptions","organizations_url":"https://api.github.com/users/Manishearth/orgs","repos_url":"https://api.github.com/users/Manishearth/repos","events_url":"https://api.github.com/users/Manishearth/events{/privacy}","received_events_url":"https://api.github.com/users/Manishearth/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T04:17:48Z","updated_at":"2016-08-04T04:17:48Z","body":"So mentioned this yesterday on irc and totally forgot to file an issue.\r\n\r\nMost of our passes implement just one of the check_foo methods, usually check_expr.\r\n\r\nWe create traits for ExprLint, etc. These only have the lint name method and check_expr. We then define a `ExprLintPass(Box<ExprLint>)` trait object wrapper which implements LateLintPass with check_expr forwarded to the inner lint. This means that all our expr lints will only need one copy of the defaulted late lint pass methods, which is great! \r\n\r\nWe could alternatively use a struct with fields for each pass to avoid the virtual dispatch (\"pulling them together\"), though that gets more cumbersome to deal with. I suspect the virtual dispatch won't cost much, because lints involve virtual dispatch anyway and overall take a trivial amount of time to run."}}
{"actor":{"display_login":"Manishearth"}}