-
Notifications
You must be signed in to change notification settings - Fork 453
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
Automated installation of beautifiers which are not preinstalled #1687
Comments
Here are the Docker images: https://hub.docker.com/u/unibeautify/ More coming soon! |
Close #1687. Add Executables with Docker support
Published to v0.30.0 |
* master: (79 commits) Update changelog [skip ci] Prepare 0.30.2 release Fixes Glavin001#1030. Add support for alpha versions of autopep8 Fixes Glavin001#1725. Fix version parsing of PHP executable Fixes Glavin001#1730. Correctly parse PHPCBF version and improve handling of Executable See Glavin001#1708. Re-generate documentation for Fortran file extension changes Prepare 0.30.1 release Prepare changelog for v0.30.1 See Glavin001#1725. Update changelog Fixes Glavin001#1725. Improve PHP-CS-Fixer support with handling script path Update changelog. See Glavin001#1030. Fix Glavin001#1030. Autopep8 Executable did not handle older and newer versions Prepare 0.30.0 release See Glavin001#1687. Update README, remove note about Executables now that it is supported See Glavin001#1687. Update Changelog with info about Executables Add Greenkeeper badge See Glavin001#1687. Update README docs to include details about Executables and Docker support Add more dependencies to next-update and greenkeep ignore list See Glavin001#1687. Fix typos in Travis CI config See Glavin001#1687. Install Sass-convert and Uncrustify beautifiers via Docker for Linux Travis CI build ... # Conflicts: # README.md
hi, i have installed docker pull unibeautify/php-cs-fixer and it works when docker run unibeautify/php-cs-fixer --help , but it doesnt works as looking for which path, i never used docker before, i wonder what path should i use in the beautifiers settings. thanks in advance (and sorry if this issue was not in the scope, it was the most similar i could find) |
Hey @JDias ! Thank you for reaching out. Could you please provide a |
Hi @Glavin001 , i can do that but im almost sure that is a issue related to docker. I never used docker, so im big lost.(and the provided docker install directions doesnt give nothing more than the pull command) |
Likely. And the debug.md Gist should point to that.
This is expected. The Docker container for
The pull command should be all you need, and Atom-Beautify should do the rest. The debug.md should tell us where Atom-Beautify went wrong. |
Hi @Glavin001 thanks for the attention. https://gist.github.com/JDias/f575266640b0b647453b0ac27bd62180 Ps: i manually added the php bin path Maybe it was a root/non root issue? Before docker just worked with sudo, now it works without it. Dunno how the scan/probe code work and if a rerun could help. |
What a nigthmare, man. I really appreciate your effort but I think it's not reasonable such difficulty to install a simple format plugin... This should work with a simple click or two... Several days trying to make it work with php, but it seems an impossible task. |
I definitely agree. This experience is something I have been trying to improve for years. Unibeautify is a complete rewrite of Atom-Beautify with the goal to improve user experience while adding great new features. Unfortunately, it is not so simple. The beautifiers for PHP are written in PHP, not JavaScript/Node.js. Therefore the integration is different and installation is separated using whatever package manager PHP requires. There are 4 different installation methods for PHP-CS-Fixer alone: https://github.com/FriendsOfPHP/PHP-CS-Fixer#installation Since there are so many different user setups for external tools like PHP-CS-Fixer, Atom-Beautify has a builtin debugging tool to help us figure out what is wrong. It is almost always some kind of user error from operating system specific environment variable issues (ie.
Looks like the PHP-CS-Fixer does not have a configured Executable path.
If @oxk4r01 : Please see https://github.com/Glavin001/atom-beautify/blob/master/docs/troubleshooting.md and create a Gist with your debugging information. Post a link here and we will try to help. Also feel free to submit Pull Requests improving error messages or documentation. |
Installed and "working" but the behavior is not correct. There are continuous problems with the indentation and when php and html are mixed (as in 99 % of projects occurs), the code ends completelly messed up. Not aproppiate for professional use at all (talking in therms of code formatting). I think this is an Atom's base problem, and a feature that should be addressed for the app by default, but to my knowledge, there isn't any package that could solve this question correctly. In other ides, such Netbeans, this format and beautyfying is zero problem and the results are perfect in one click. I like some of Atom's features very much (leaving appart issues such slowness and others), but the lack of implementation of basic features like this one is taking me to abandon it for basic productive reasons. |
@oxk4r01 : Atom-Beautify does not perform any beautification, it wraps existing beautifiers in a unified experience. See https://github.com/Glavin001/atom-beautify#language-support for language support. For PHP, two of the most populate would be:
If you are experiencing issues where the Atom-Beautify is correctly detecting PHP, however, the beautifier (PHP-CS-Fixer or PHPCBF) is not generating your desired result, I recommend you reach out to their respective GitHub pages with the links above. If you need assistance determining if Atom-Beautify is working and which beautifier is being applied:
Hope this helps! |
Attention
If you are viewing this issue and think it is a great idea, please vote with a 👍. Thanks in advance! Your feedback is appreciated. After all, Atom-Beautify is for you 😄 .
Problem: Some beautifiers require manual installation by users
Not all beautifiers are written in Node.js and therefore require manual installation by users.
See https://github.com/Glavin001/atom-beautify#beautifiers for list of beautifiers and support.
Some users experience issues trying to install these dependencies on their own.
Can we make this process smoother? Or could we make this process automated? Better yet, could we make this process automatic, such that if the dependency is not already installed then Atom-Beautify will detect this and install it for the user, upon request?
Yes, I think we can.
Solution: Add Docker support to Executables
Executables
is a new feature being developed in this branch: https://github.com/Glavin001/atom-beautify/tree/feature/executablesDocker will allow us to abstract away most of the problems with cross-platform (i.e. Windows, Mac, Linux) installation.
Here are some useful Docker images:
Inspired by https://github.com/whalebrew/whalebrew-packages
Questions for Users
php-cs-fixer --help
vsdocker run -it unibeautify/php-cs-fixer --help
the former ran faster, however not by much.The text was updated successfully, but these errors were encountered: