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

Unquote templates, add a warning instead. #1008

Merged
merged 1 commit into from
Jan 10, 2016

Conversation

ferd
Copy link
Collaborator

@ferd ferd commented Jan 10, 2016

Now we get this:

$ rebar3 new lib mylib
===> File "mylib/src/mylib.erl" already exists
===> File "mylib/src/mylib.app.src" already exists
===> File "mylib/rebar.config" already exists
===> File "mylib/.gitignore" already exists
===> File "mylib/LICENSE" already exists
===> File "mylib/README.md" already exists

$ rebar3 new lib my-lib
===> The 'name' variable is often associated with Erlang
module names and/or file names. The value submitted (my-lib)
isn't an unquoted Erlang atom. Templates generated may
contain errors.
===> Writing my-lib/src/my-lib.erl
===> Writing my-lib/src/my-lib.app.src
===> Writing my-lib/rebar.config
===> Writing my-lib/.gitignore
===> Writing my-lib/LICENSE
===> Writing my-lib/README.md

Would resolve #997

@tsloughter
Copy link
Collaborator

Great! And nice way way of checking the atom, I was going to do a stupid regex that checked it for certain characters like -, haha, this is way smarter.

@ferd
Copy link
Collaborator Author

ferd commented Jan 10, 2016

Yeah, I started with the regex and got annoyed. Found this in io_lib, works well.

@ferd
Copy link
Collaborator Author

ferd commented Jan 10, 2016

agh let me remove the ?ERROR thing

tsloughter added a commit that referenced this pull request Jan 10, 2016
Unquote templates, add a warning instead.
@tsloughter tsloughter merged commit 3f7370f into erlang:master Jan 10, 2016
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.

Don't quote all atoms in templates
2 participants