-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add Elixir language support with exfmt #2
Conversation
README.md
Outdated
@@ -31,14 +32,14 @@ See list of beautifier Docker images at https://hub.docker.com/u/unibeautify/ | |||
### Using Whalebrew | |||
|
|||
1. Install [Whalebrew](https://github.com/bfirsh/whalebrew) | |||
2. `whalebrew install unibeautify/BEAUTIFIER` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These spaces are actually intentional 😉 .
Just setup the new Docker repository: https://hub.docker.com/r/unibeautify/exfmt/builds/ Going to make sure it builds again fine (Travis CI says it does) and then we can merge. Would you be able to undo the Readme changes? I prefer the |
You are right, new lines look better |
Thank you for contributing! |
@kumekay It looks like with the upcoming release of Elixir 1.6, code formatting will be integrated into the installation of the Elixir language (https://hashrocket.com/blog/posts/format-your-elixir-code-now). I've never used Elixir so I'll rely on those that have, but would it be better to use that versus exfmt? That's the way Go files are formatted with Atom Beautify, it uses the built-in gofmt command. That way it won't require a separate Docker image, it would be built into the base Elixir image when it's released. Right now exfmt requires Elixir 1.6-dev anyways, which isn't even available as a Docker image and thus is failing. |
Atom-Beautify should support both formatters, |
As exfmt author metioned in lpil/exfmt#86
So yes, I think it should support only built in one |
Thanks for the info @kumekay . Would users of Elixir version <= 1.5 be able to use this new builtin formatter? I would assume not, therefore we should make the builtin formatter default, and |
extfmt requires 1.6 though
On Mon, Oct 30, 2017, 6:10 PM Glavin Wiechert ***@***.***> wrote:
Thanks for the info @kumekay <https://github.com/kumekay> .
Would users of Elixir version <= 1.5 be able to use this new builtin
formatter? I would assume not, therefore we should make the builtin
formatter default, and extfmt a fallback for legacy users.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AH7gnq3U3NSfj1gs5PIoAoZKjU4ZlRauks5sxld5gaJpZM4OFogr>
.
--
Thanks,
Steven
|
Sounds like there is absolutely no reason for Pull Requests welcome to add builtin formatter support and remove old |
Yea, once 1.6 is official I'll submit a PR in Atom Beautify to change the executable. The Docker image here can be completely removed since Elixir is a core Docker image. |
Looks like Elixir 1.6 is available as of a couple of weeks ago, so native formatting is built into it. |
And the build is currently failing after said update 😝 : https://hub.docker.com/r/unibeautify/exfmt/builds/bwrhhexwcjbcaqcz6erpvab/
|
It's been failing for a long time because the base Docker image for Elixir had always been 1.5. But doesn't matter anymore because formatting is built into the base Docker image now. |
Failing build doesn't matter? 😝 Sounds like the fix is just to simplify the image 👍 . |
I guess what I'm saying is we don't need that image anymore, so I would say just remove that Dockerfile entirely. https://hexdocs.pm/mix/master/Mix.Tasks.Format.html#content |
The value in the Docker containers remains, as they are isolated and easily installable. For example, I do not use Elixir, however I usually want to test every beautifier for Atom-Beautify. I use the Docker containers to quickly install these beautifiers. Otherwise, I would have to install Elixir or Mix or whatever is required. Furthermore, if I wished to uninstall it may be non-trivial to delete all of the files. Docker containers make even uninstallation trivial. |
Just read a little deeper, 1.6 is in RC stage right now, so 1.5.3 is still the "latest" version. Apart from building from source, the build for that Dockerfile will continue to fail. I understand and agree with what you're saying about the Docker containers. In this instance though, the official Elixir Docker image will be better suited for beautification of Elixir code. The author of exfmt also says that it will be redundant once 1.6 is released. So instead of pulling from unibeautify/exfmt, you would just do |
Finally 1.6 is released, I'll make an update this weekend |
Yea, but I don't think there is a Docker image for us to continue with. The new official Elixir 1.6 images, like those here https://store.docker.com/images/elixir, will have those features built right into them. |
@szeck87 We need a Docker image which runs the format command directly. The beautifier image simply being a wrapper with additional info including:
Running this image calls |
|
OK I think you're right. I was concerned about the arguments for Atom-Beautify's "Executables". For Atom-Beautify's current implementation of "Executables" it assumes both Docker and non-Docker installations of beautifiers use the same arguments. However, the Executable is |
No description provided.