# Conditional import fails to compile

**URL:** <https://forum.elixirforum.com/t/conditional-import-fails-to-compile/42907>\
**Category:** Questions\
**Tags:** compiling, import\
**Created:** [October 6, 2021, 9:10pm UTC](https://forum.elixirforum.com/t/conditional-import-fails-to-compile/42907 "2021-10-06T21:10:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ngeraedts](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ngeraedts/32/16358_2.png) [@ngeraedts](https://forum.elixirforum.com/u/ngeraedts)\
**Post date:** [October 18, 2021, 5:02pm UTC](https://forum.elixirforum.com/t/conditional-import-fails-to-compile/42907/5 "2021-10-18T17:02:44Z")

</div>

Thanks aziz and José.

Just so I really cement my understanding, the `body` block containing the import in the `only_in/2` macro is never unquoted in the module during compilation (or a preprocessing stage?), whereas mine fails because the import is directly in the module body. Is this correct?

Is there a good place to read up on the compilation process, or should i start digging through the Elixir source tree?

---

_[View the full topic](https://forum.elixirforum.com/t/conditional-import-fails-to-compile/42907)._
