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

pre_hooks do not translate color escape code. Results in blocking of stdout/gibberish (half fixed) #1476

Closed
vans163 opened this issue Feb 10, 2017 · 4 comments
Labels
minor bug bug that does not prevent major features from working

Comments

@vans163
Copy link
Contributor

vans163 commented Feb 10, 2017

Environment

Rebar3 report
version 3.3.1
generated at 2017-02-10T20:48:44+00:00

Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)

Task:
Entered as:


Operating System: x86_64-redhat-linux-gnu
ERTS: Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:32:32] [async-threads:0] [hipe] [kernel-poll:false]
Root Directory: /usr/lib64/erlang
Library directory: /usr/lib64/erlang/lib

Loaded Applications:
bbmustache: 1.0.4
certifi: 0.4.0
cf: 0.2.1
common_test: 1.13
compiler: 7.0.3
crypto: 3.7.2
cth_readable: 1.2.3
dialyzer: 3.0.3
edoc: 0.8.1
erlware_commons: 0.21.0
eunit: 2.3.2
eunit_formatters: 0.3.1
getopt: 0.8.2
inets: 6.3.4
kernel: 5.1.1
providers: 1.6.0
public_key: 1.3
relx: 3.21.0
sasl: 3.0.2
snmp: 5.2.4
ssl_verify_fun: 1.1.1
stdlib: 3.2
syntax_tools: 2.1.1
tools: 2.9

AND

Rebar3 report
version 3.3.5
generated at 2017-02-10T20:51:51+00:00

Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)

Task:
Entered as:


Operating System: x86_64-redhat-linux-gnu
ERTS: Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:32:32] [async-threads:0] [hipe] [kernel-poll:false]
Root Directory: /usr/lib64/erlang
Library directory: /usr/lib64/erlang/lib

Loaded Applications:
bbmustache: 1.3.0
certifi: 0.4.0
cf: 0.2.2
common_test: 1.13
compiler: 7.0.3
crypto: 3.7.2
cth_readable: 1.2.3
dialyzer: 3.0.3
edoc: 0.8.1
erlware_commons: 1.0.0
eunit: 2.3.2
eunit_formatters: 0.3.1
getopt: 0.8.2
inets: 6.3.4
kernel: 5.1.1
providers: 1.6.0
public_key: 1.3
relx: 3.22.2
sasl: 3.0.2
snmp: 5.2.4
ssl_verify_fun: 1.1.1
stdlib: 3.2
syntax_tools: 2.1.1
tools: 2.9


Escript path:
Providers:
app_discovery as auto clean compile compile cover ct deps dialyzer do edoc escriptize eunit get-deps help install install_deps list lock new path pkgs release relup report shell state tar tree unlock update upgrade upgrade upgrade version xref

Going from 3.3.1 to 3.3.5 this issue is half fixed.

In 3.3.1 when using pre_hooks and calling something like gcc or anything else that prints in color, rebar3 prints gibberish to the console for the color escape codes. This happens on the first start and further rebar_agent:do(compile)'s

In 3.3.5 the same thing happens except on first start / compile the color codes are properly stripped, but further rebar_agent:do(compile) do not properly print the color codes and it results in gibberish or a blocking of output.

Attached image
http://imgur.com/a/XBEUW

@ferd ferd added the minor bug bug that does not prevent major features from working label Feb 11, 2017
@vans163
Copy link
Contributor Author

vans163 commented Feb 13, 2017

@ferd, This blocks stdout depending which escape codes get printed, the entire erlang shell locks and produces no output. The only way out is to kill -9 or ctrl+c+c the shell to exit.

@ferd
Copy link
Collaborator

ferd commented Feb 13, 2017

Yeah that might be so, but color codes in other things are likely to:

  • always have blocked or somewhat broken
  • not been shipped with rebar3 core since the hooks are kind of out of our control there

I'm not denying this is a bug, but this is not one where everything is major and blocking (such as fetching the wrong deps or crashing on regular runs). It's only why I tagged it as a minor bug. Maybe I need to introduce more levels for bugs.

@paulo-ferraz-oliveira
Copy link
Contributor

I've used pre_hooks for clean and compile and have never felt this issue. Using 3.14.1. Is it still an issue?

@ferd
Copy link
Collaborator

ferd commented Sep 14, 2020

This was likely fixed in #2212 since they seem related.

@ferd ferd closed this as completed Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor bug bug that does not prevent major features from working
Projects
None yet
Development

No branches or pull requests

3 participants