Open timothybasanov opened 11 years ago
Not sure how to look into this. Any idea on how to reproduce it? What version of Erlang are you using?
I uninstalled Erlang Solitions Erlang and reinstalled it from homebrew. Now it works just fine and problem does not reproduce itself anymore.
I think that I used R16A and R15B03 from Erlang Soutions, Mac OS 64 bit package to let it crash.
As it does not reproduce anymore, ticket could be closed. Thanks!
Timothy Basanov
On Thu, Feb 28, 2013 at 8:35 PM, Roberto Ostinelli <notifications@github.com
wrote:
Not sure how to look into this. Any idea on how to reproduce it? What version of Erlang are you using?
— Reply to this email directly or view it on GitHubhttps://github.com/ostinelli/SublimErl/issues/56#issuecomment-14272826 .
The same happens here under Ubuntu with R16B from Erlang Solutions.
Does all the rest of the plugin actually work? Or is it only the code reformat?
Yes, the rest works just fine. Only formatting seems to have problem under Erlang Solution's R15 and R16.
Ok thank you.
Ok, so I found a problematic command -- it's retcode, data = SUBLIMERL.execute_os_command('%s %s' % (SUBLIMERL.escript_path, escript_command))
in sublimerl_formatter.py in line 54. It calls /usr/local/bin/escript sublimerl_formatter.erl '/some_path_here/tmpl5fUjO'
, the temp file is (obviously?) equal to test.erl and yet the escript command never finishes.
What's weird: escript is stuck at compiling the file. Very strange. I think I saw something related on some erlang mailing list.
Yet SublimErl seem ok, issue to be closed. If I'd find anything, I'll leave further notes here.
Ok, found it quicker than I expected: http://erlang.org/pipermail/erlang-bugs/2013-March/003454.html
The module (distilled here: http://pastebin.com/2Q1m3beB ) takes 120s to compile (so we thought it's hanged). On the mailing list is distilled module from vimerl which is also problematic.
The problem was introduced R16A/B and shall be fixed in R16B01 (on R15B03 everything works just fine).
--edit--
A quickfix: comment-out -mode(compile).
line. Diff below:
--- a/support/sublimerl_formatter.erl
+++ b/support/sublimerl_formatter.erl
@@ -30,7 +30,7 @@
%% NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
%% POSSIBILITY OF SUCH DAMAGE.
%% ==========================================================================================================
--mode(compile).
+%-mode(compile).
% macros
-define(IS(T, C), (element(1, T) == C)).
Thank you for this. Will update the README.
I've created simple project rooted at ~/Documents/Erlang with only one file:
~/Documents/Erlang/test/src/test.app.src/test.erl
When I try to reformat it, Sublime hangs, quits only on Forced Quit.
Not sure how to provide more useful information.