Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around hot-reloading issue again #1745

Merged
merged 1 commit into from Jul 23, 2018
Merged

Work around hot-reloading issue again #1745

merged 1 commit into from Jul 23, 2018

Conversation

sharils
Copy link
Contributor

@sharils sharils commented Jul 21, 2018

See phoenixframework/phoenix#1165 for more detail


This change is Reviewable

@sharils sharils changed the title Work around hot-reloading issue Work around hot-reloading issue again Jul 21, 2018
Copy link
Member

@w0rp w0rp left a comment

Choose a reason for hiding this comment

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

I had a read through the thread. Can you explain how this works? How does outputting some help text fix a hot-reloading issue? Thanks in advance.

@sharils
Copy link
Contributor Author

sharils commented Jul 23, 2018

@w0rp

Sure, I can explain.

When dializer isn't a dependency, mix dialyzer recompiles the whole project because it's not possible to know if this command dialyzer exist or not until recompilation is done. Then the timestamps of the project is messed up which results in broken hot-loading. In this case, mix help dialyzer would return zero which prevents compilation of the whole project since dialyzer isn't installed, it's help manual doesn't exist.

When dialyzer is a dependency, mix dialyzer would just run the command. In this case, mix help dialyzer would return 1 which allows mix dialyzer to run.

Let me know if you have further question. It's my pleasure to answer any further question.

BTW, this kind of work around has been proposed before, #1266 . It just that at the time when 1266 was still being review, the dialyzer linter is also being reviewed #1257 , thus in that PR, dialyzer wasn't included.

Best

When dializer isn't a dependency, mix dialyzer recompiles the whole
project because it's not possible to know if this command dialyzer exist
or not until recompilation is done. Then the timestamps of the project
is messed up which results in broken hot-loading. In this case, mix help
dialyzer would return zero which prevents compilation of the whole
project since dialyzer isn't installed, it's help manual doesn't exist.

When dialyzer is a dependency, mix dialyzer would just run the command.
In this case, mix help dialyzer would return 1 which allows mix dialyzer
to run.
@sharils
Copy link
Contributor Author

sharils commented Jul 23, 2018

I've also amended the commit message to include the reason this work around works.

Copy link
Member

@w0rp w0rp left a comment

Choose a reason for hiding this comment

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

Thanks for the explantation. This makes sense to me.

@w0rp w0rp merged commit 11339ca into dense-analysis:master Jul 23, 2018
@w0rp
Copy link
Member

w0rp commented Jul 23, 2018

Cheers! 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants