# Let proc macros pass information to the compiler

**URL:** <https://internals.rust-lang.org/t/let-proc-macros-pass-information-to-the-compiler/8350>\
**Category:** Uncategorized\
**Created:** [September 2, 2018, 6:42am UTC](https://internals.rust-lang.org/t/let-proc-macros-pass-information-to-the-compiler/8350 "2018-09-02T06:42:20Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![petrochenkov](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/petrochenkov/32/2784_2.png) [@petrochenkov](https://internals.rust-lang.org/u/petrochenkov)\
**Post date:** [September 4, 2018, 1:09pm UTC](https://internals.rust-lang.org/t/let-proc-macros-pass-information-to-the-compiler/8350/19 "2018-09-04T13:09:25Z")

</div>

> [@matklad](#):
>
> Good Code Analyzers don’t guess the meaning of valid code: they run the same analysis as the compiler, with comparable number of bugs.

There's something fundamentally wrong with requirement to run compiler to get navigation/completion/etc.

Large C++ (and Rust, if you include `rustc`) projects (which need a Code Analyzer most, compared to small projects) I worked with often had their own bespoke build systems that required preliminary configuration, required options to pass, generated code from DSLs, lacked the "just build" command, were possibly too slow to invoke them automatically. And without that build system you cannot run the build or invoke compiler.

In this case tools using heuristics like racer, VSCode C++ plugins, ctags, whatever, more or less work and give acceptable results.  
At the same time RLS that _needs_ to run the build just plain gives up on rustc codebase.

---

_[View the full topic](https://internals.rust-lang.org/t/let-proc-macros-pass-information-to-the-compiler/8350)._
