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

Fix escript.build deps warning #1

Merged
merged 1 commit into from
May 27, 2017
Merged

Fix escript.build deps warning #1

merged 1 commit into from
May 27, 2017

Conversation

davedoesdev
Copy link
Contributor

Without this, mix escript.build gives the following warning:

warning: variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name
  /home/david/centro/test/example/elixir/deps/eventsource_ex/mix.exs:10

@cwc cwc merged commit 28e05b8 into cwc:master May 27, 2017
@davedoesdev
Copy link
Contributor Author

davedoesdev commented May 28, 2017

@cwc thanks. I've no idea why mix didn't warn about these until the deps ones were fixed but now it does:

avid@david-Latitude-E6440:~/centro/test/example/elixir/apps/subscribe$ mix escript.build
==> eventsource_ex
Compiling 2 files (.ex)
warning: variable "self" does not exist and is being expanded to "self()", please use parentheses to remove the ambiguity or change the variable name
  lib/eventsource_ex.ex:7

warning: variable "self" does not exist and is being expanded to "self()", please use parentheses to remove the ambiguity or change the variable name
  lib/eventsource_ex.ex:18

Generated eventsource_ex app

If I change self to self() then the warnings go. Would you like another PR for those?

@cwc
Copy link
Owner

cwc commented May 28, 2017

That would be cool. I assume the Elixir team made the decision to prompt a more explicit code style - so that it's more obvious to the second programmer on a project that e.g. self is not merely a variable, but a function call.

@davedoesdev
Copy link
Contributor Author

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.

2 participants