View Issue Details

IDProjectCategoryView StatusLast Update
0003797Spring engineGeneralpublic2013-05-21 20:38
ReporterLicho Assigned TojK  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version94.1.1+git 
Target Version95.0 
Summary0003797: bash tags make it hard to parse spring output when redirect
DescriptionZKL and springie redirect process output and parse chat lines.
The new bash color tags make it harder to process.

Please add option to disable this feature (preferably using env so its backwards compatible with older spring).
(Even on linux)
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

jK

2013-05-20 22:56

developer   ~0010715

there is `--nocolor`

Licho

2013-05-21 03:04

reporter   ~0010717

That will fail on earlier versions of spring engine!! (--config not known -> spring not started)

The last thing I want is to maintain some table of supported switches for every version of engine..

When you add breaking features make them optional! (= --color and not --nocolor)

Kloot

2013-05-21 14:18

developer   ~0010718

Last edited: 2013-05-21 14:19

Spring's std output is neither intended nor designed for parsing.

The fact you have introduced a fragile dependency by doing so anyway is your problem.

Licho

2013-05-21 15:50

reporter   ~0010722

It is intended for parsing and has always been parsed for at least 6 last years, since the first autohosts and later lobbies.

It is irreplaceable if you want to support basic features across all mods - like real time chat text to speech conversion, unit stats and other features that exist for ages.

Spring engine does not exist in vacuum, it is in the middle of complex ecosystem of tools, games and other software.
You have to deal with it, if you keep changing stuff "just because you can" disregarding all around you, you will just lose that ecosystem and later the players too.

Nobody is too thrilled to go on hunting for bugs caused by cosmetic "change for change" in engine only to get response by arrogant dev when reported.

jK

2013-05-21 20:02

developer   ~0010727

Last edited: 2013-05-21 20:03

Added `--quiet` so such issues won't happen in the future anymore.
Still I won't revert to default non-colorized stdout just cause it would need some 3-liner bash script in springie.

#!/bin/sh
SPRING_PATH="./spring"
IS_95=`echo "if ( $(${SPRING_PATH} --sync-version | sed 's/^\([0-9]*\.[0-9]*\).*/\1/') <= 94 ) 0 else 1" | bc`
if [ $IS_95 -eq 1 ]; then
  ${SPRING_PATH} --nocolor --quiet $@
else
  ${SPRING_PATH} $@
fi

abma

2013-05-21 20:19

administrator   ~0010728

Last edited: 2013-05-21 20:20

as already suggested, why not "preferably using env" ? its backwards compatible and should be easy to implement (just check if NO_COLOR is set).

also springie is afaik running on windows...

abma

2013-05-21 20:24

administrator   ~0010729

@Licho:
you created this bug report some time after this commit:
https://github.com/spring/spring/commit/12738f566e572e07c3fb672e18a02110798c5eec

which rev of spring did you test? is springie running on windows?

abma

2013-05-21 20:38

administrator   ~0010730

https://github.com/spring/spring/commit/b9f9f068998c4b775b0a70a62b4f1e4efabad0e6

thanks jk!

everybody is happy now i hope ;)

Issue History

Date Modified Username Field Change
2013-05-20 22:23 Licho New Issue
2013-05-20 22:56 jK Note Added: 0010715
2013-05-20 22:56 jK Status new => resolved
2013-05-20 22:56 jK Resolution open => fixed
2013-05-20 22:56 jK Assigned To => jK
2013-05-21 03:04 Licho Note Added: 0010717
2013-05-21 03:04 Licho Status resolved => feedback
2013-05-21 03:04 Licho Resolution fixed => reopened
2013-05-21 12:45 abma Target Version => 95.0
2013-05-21 14:18 Kloot Note Added: 0010718
2013-05-21 14:19 Kloot Note Edited: 0010718
2013-05-21 15:50 Licho Note Added: 0010722
2013-05-21 15:50 Licho Status feedback => assigned
2013-05-21 19:37 jK Changeset attached => spring develop 6ba6c908
2013-05-21 20:02 jK Note Added: 0010727
2013-05-21 20:02 jK Status assigned => resolved
2013-05-21 20:02 jK Resolution reopened => fixed
2013-05-21 20:02 jK Status resolved => feedback
2013-05-21 20:02 jK Resolution fixed => reopened
2013-05-21 20:02 jK Note Edited: 0010727
2013-05-21 20:02 jK Status feedback => resolved
2013-05-21 20:02 jK Resolution reopened => fixed
2013-05-21 20:03 jK Status resolved => feedback
2013-05-21 20:03 jK Resolution fixed => reopened
2013-05-21 20:03 jK Note Edited: 0010727
2013-05-21 20:03 jK Status feedback => resolved
2013-05-21 20:03 jK Resolution reopened => fixed
2013-05-21 20:19 abma Note Added: 0010728
2013-05-21 20:20 abma Note Edited: 0010728
2013-05-21 20:24 abma Note Added: 0010729
2013-05-21 20:38 abma Note Added: 0010730