Skip to content

Conversation

smorin
Copy link
Contributor

@smorin smorin commented Jun 26, 2018

Add example of using iex -S mix compile

Add example of using iex -S mix compile
@michalmuskala
Copy link
Member

I don't think the compile part is necessary - iex -S mix should automatically compile.

@smorin
Copy link
Contributor Author

smorin commented Jun 26, 2018 via email

@josevalim
Copy link
Member

mix compile won't load dependent modules. It will load them only if they happened to be compiled at the moment. But if you run iex -S mix compile twice, then nothing should be available the second time. If the default mix tasks is replaced and you want to run your app, then iex -S mix run is the way to go.

Btw, we talk about this on the supervisor chapter: https://elixir-lang.org/getting-started/mix-otp/supervisor-and-application.html (search for iex -S mix run).

Updated based on Jose's correction
@smorin
Copy link
Contributor Author

smorin commented Jun 27, 2018

Thanks see the references there very helpful.

Updated reference to more detailed documentation based jose's comments.
@@ -55,6 +55,8 @@ It seems we are ready to go! We will use the interactive shell quite a lot in th

> Note: if you are on Windows, you can also try `iex.bat --werl` which may provide a better experience depending on which console you are using.

> Note: if you want to run `iex` with the project and dependent modules automatically loaded in interactive mode run `iex -S mix run`. See [Supervisor and application](/getting-started/mix-otp/supervisor-and-application.html) for more details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid this will be confusing for developers getting started because at this point they have no idea what mix is. Should they run this command? Does it matter? What are "dependent modules"? What is interactive mode? Remember this is the first chapter of the getting started.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay makes sense. I'll move this to the next section that talks about IEX

smorin and others added 3 commits June 27, 2018 09:38
Removed comment as suggested by Jose
Updated version, please let me know if this is a better introduction and flows better
@josevalim josevalim merged commit 59e44e8 into elixir-lang:master Jun 27, 2018
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

vladdu pushed a commit to vladdu/elixir-lang.github.com that referenced this pull request Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants