Tools: Optical issue with NXF ansi

Created on 4 May 2019  路  8Comments  路  Source: nf-core/tools

Hi everyone,

just found out that the new and now default ansi Nextflow log seems to malform our colored output on the console a bit:

Bildschirmfoto 2019-05-04 um 23 33 37

Running the same nextflow version with -ansi-log false gives this:

Bildschirmfoto 2019-05-04 um 23 33 16

(as we wanted it).

I just wanted to make that behavior documented here, to give @pditommaso some feedback 馃憤

(similar behavior when working with the rnaseq, eager etc pipelines - seems to be something introduced with Nextflow 19.04.X)

bug question template

Most helpful comment

I think it gets messed up with the library used by NF to render the ansi code.

https://github.com/nextflow-io/nextflow/blob/95f4dd7bddd30087b7d17571364c881d2e1e161a/modules/nextflow/src/main/groovy/nextflow/trace/AnsiLogObserver.groovy#L258-L266

Likely it escapes the ANSI code because it's not expecting it ..

All 8 comments

https://github.com/nextflow-io/nextflow/issues/1129

Hopefully, it's just a case of updating the template with another ANSI code.

I guess its just that yes 馃憤

Although the stated ones are actually correct:
https://devhints.io/ansi

It seems that the the first character in the multi line String is the ${c_dim} variable, that is not properly escaped for some reason.

The simplest 'fix' probably is to either remove c_dim from the first line or insert a newline before.

I think it gets messed up with the library used by NF to render the ansi code.

https://github.com/nextflow-io/nextflow/blob/95f4dd7bddd30087b7d17571364c881d2e1e161a/modules/nextflow/src/main/groovy/nextflow/trace/AnsiLogObserver.groovy#L258-L266

Likely it escapes the ANSI code because it's not expecting it ..

Can / should we use the same library instead of hardcoding the colour codes?

That would be ideal if this is possible :+1:

Was this page helpful?
0 / 5 - 0 ratings