Warn on empty continuation lines only, not on comment-only lines#35004
Conversation
There was a problem hiding this comment.
Do you think this ought to re-use tokenComment to keep a single-source-of-truth, or maybe it doesn't matter?
There was a problem hiding this comment.
oh, good one, yes, can do
Commit 8d1ae76 added deprecation warnings for empty continuation lines, but also treated comment-only lines as empty. This patch distinguishes empty continuation lines from comment-only lines, and only outputs warnings for the former. Signed-off-by: Sebastiaan van Stijn <[email protected]>
8ae6836 to
2fd736a
Compare
|
@tianon done 👍 |
|
Looks like a much better solution than mine. It's much clearer what the patch is changing, and why. |
During docker image building procedure you may observe warning `[WARNING]: Empty continuation line found`. This is docker bug, see more details here: - moby/moby#35004 - appropriate/docker-jetty#79
|
For future reference; this patch was included in docker 17.10 docker-archive/docker-ce@f6d296e |
|
Since 17.09 is a "stable" release, would it make sense to add this to the pile of potential-backport-candidates for a future 17.09.1? 😇 |
|
@tianon I'll add it to the pile for consideration, but it may be considered "non-critical" as the issue doesn't break the build (but, yes, it's confusing/annoying) |
|
Thanks! Definitely agree with that assessment -- I just want to make sure it's in the pile of things being considered if something critical enough to warrant a 17.09.1 does come up. 👍 |
|
Hurray! I just updated to the latest docker-for-mac edge build, and can confirm that I no longer get giant sees of red text in my |
There are warnings that would be emitted because of empty line continuation characters. This commit should eliminate the warnings in the next release of docker. See: moby/moby#35004
Grumble, grumble Fixes warnings based on: * moby/moby#33719 * moby/moby#35004
This was appearing in the build output:
[WARNING]: Empty continuation line found in:
RUN apt-get update && apt-get upgrade -y && addgroup --gid 500 core && adduser --home /home/core --shell /bin/bash --uid 500 --gid 500 --disabled-password --system core && addgroup --gid 253 fleet && adduser core fleet && addgroup --gid 233 coredocker && adduser core coredocker && addgroup --gid 248 core-systemd-journal && adduser core core-systemd-journal && DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata sudo net-tools inetutils-ping bash-completion mc tmux openssh-client && apt-get clean && ln -s /lib/x86_64-linux-gnu/libdevmapper.so.1.02.1 /lib/x86_64-linux-gnu/libdevmapper.so.1.02 && sed -i "s/%!s(MISSING)udo\s*ALL=(ALL:ALL)\s*ALL/%!s(MISSING)udo ALL=(ALL:ALL) NOPASSWD:ALL/" /etc/sudoers && adduser core sudo && mv /etc/bash.bashrc /etc/bash.basrc.coreos && echo ". /etc/bash.bashrc.coreos\nPS1=\"\\[\\033[01;35m\\]toolbox\\[\\033[01;34m\\] \$PS1\"" >/etc/bash.bashrc
[WARNING]: Empty continuation lines will become errors in a future release.
This should be fixed by using a later version of Docker to build per
moby/moby#35004
This was appearing in the build output:
[WARNING]: Empty continuation line found in:
RUN apt-get update && apt-get upgrade -y && addgroup --gid 500 core && adduser --home /home/core --shell /bin/bash --uid 500 --gid 500 --disabled-password --system core && addgroup --gid 253 fleet && adduser core fleet && addgroup --gid 233 coredocker && adduser core coredocker && addgroup --gid 248 core-systemd-journal && adduser core core-systemd-journal && DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata sudo net-tools inetutils-ping bash-completion mc tmux openssh-client && apt-get clean && ln -s /lib/x86_64-linux-gnu/libdevmapper.so.1.02.1 /lib/x86_64-linux-gnu/libdevmapper.so.1.02 && sed -i "s/%!s(MISSING)udo\s*ALL=(ALL:ALL)\s*ALL/%!s(MISSING)udo ALL=(ALL:ALL) NOPASSWD:ALL/" /etc/sudoers && adduser core sudo && mv /etc/bash.bashrc /etc/bash.basrc.coreos && echo ". /etc/bash.bashrc.coreos\nPS1=\"\\[\\033[01;35m\\]toolbox\\[\\033[01;34m\\] \$PS1\"" >/etc/bash.bashrc
[WARNING]: Empty continuation lines will become errors in a future release.
This should be fixed by using a later version of Docker to build per
moby/moby#35004
Alternative approach to #34333
Commit 8d1ae76 added deprecation warnings for empty continuation lines, but also treated comment-only lines as empty.
This patch distinguishes empty continuation lines from comment-only lines, and only outputs warnings for the former.
ping @dnephin @tianon