Open rneatherway opened 9 years ago
I don't think travis_fold
expects to have \n
within the name. I don't think travis-web can handle such markers. I don't know how difficult it is to make this pretty, but I tend to think this is a feature with little benefit for whatever work that's necessary.
@BanzaiMan, I'm not sure what you mean. Isn't travis just interpreting what is output to standard output? The \n
characters will all appear as literal newlines in the output.
On the web page, travis-web interprets what is in the log file, and marks up appropriately so that it can be displayed the way the users expect. Having multiple newlines breaks travis-web. I am not sure what benefit having multiple newlines would bring the users.
I think we're talking at cross-purposes here. I am not attempting to have a folding name that contains newlines. My echo
command, both within the makefile and in travis.yml, just wraps a bit of output in folds named makeX
for X from 1 to 4.
If you look at the raw logfile then you can see that when the post-command output of the form:
Command 'XXXXXXXX' exited with 0
is printed, it is not being properly escaped, so the \n
characters are converted to newlines. This means that what should be:
[32;1mThe command "echo -e "travis_fold:start:make3\nline5\nline6\ntravis_fold:end:make3\n\nbetween\n\ntravis_fold:start:make4\nline7\nline8\ntravis_fold:end:make4\n"" exited with 0.
becomes:
[32;1mThe command "echo -e "travis_fold:start:make3
line5
line6
travis_fold:end:make3
between
travis_fold:start:make4
line7
line8
travis_fold:end:make4
"" exited with 0.
As a result there appear to be multiple instance of fold commands for 3/4 in the output and travis-web gets understandably confused.
Hi, any thoughts on this one? Do you see what I mean now?
Ping
Sorry for the delay. Does travis_fold
work as expected in .travis.yml
if you didn't put \n
within?
Yes
I’ve recently adjusted the log code so that folds with the same name are assigned unique internal names. Is it okay to close this issue now, @rneatherway?
The commands are still not escaped when output to the logfile, so most of the problem persists (see my comment above https://github.com/travis-ci/travis-ci/issues/2798#issuecomment-56534039). In my test repo there should only be one fold with each name.
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues
It seems that I don't actually have permission to reopen this issue, although it is still relevant. I just reran a build on my test repo to confirm the issue still exists: https://travis-ci.org/rneatherway/travis_folding/builds/171956623?utm_source=github_status&utm_medium=notification
Thanks for the update, I’ll open the issue. I’m quite occupied with major changes elsewhere, I’m not sure when I’ll be able to get back to this, sorry.
Understood :-)
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue in 24 hours. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues
:-(
Please see my test repository at https://github.com/rneatherway/travis_folding/.
My .travis.yml first calls a Makefile with a single target that runs
This is correctly folded into
make1
and thenmake2
. I then run the same command (with incremented task numbers) directly from.travis.yml
. The output is strange in a few ways:""
when its exit code is reported.make4
) is not closed, and so absorbs the following script steps incorrectly.The output can be seen at https://travis-ci.org/rneatherway/travis_folding/builds/35718401