Skip to content

Fix LegacyKeyValueFormat report from docker build: pr#153529

Open
homersimpsons wants to merge 1 commit intorust-lang:mainfrom
homersimpsons:chore/fix-LegacyKeyValueFormat-pr
Open

Fix LegacyKeyValueFormat report from docker build: pr#153529
homersimpsons wants to merge 1 commit intorust-lang:mainfrom
homersimpsons:chore/fix-LegacyKeyValueFormat-pr

Conversation

@homersimpsons
Copy link
Contributor

Part of #152305

r? @marcoieni

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Mar 7, 2026
Comment on lines +42 to 45
ENV SCRIPT=" \
# Check some tools that aren't included in `x check` by default, to
# ensure that maintainers can still do check builds locally.
python3 ../x.py check \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcoieni How would you like to handle this? (1 or 4 or other solution?)

Original outputs:

ENV SCRIPT_SOURCE \
  # Check some tools that aren't included in `x check` by default, to
  # ensure that maintainers can still do check builds locally.
  python3 ../x.py check
SCRIPT_SOURCE=python3 ../x.py check
  1. This outputs spaces:
ENV SCRIPT=" \
  # Check some tools that aren't included in `x check` by default, to
  # ensure that maintainers can still do check builds locally.
  python3 ../x.py check"
SCRIPT_TARGET=   python3 ../x.py check
  1. This does not compile:
ENV SCRIPT_TARGET="#Check some tools that aren't included in `x check` by default, to
  # ensure that maintainers can still do check builds locally.
  python3 ../x.py check"
Dockerfile:9
--------------------
   7 |     ENV SCRIPT_TARGET="#Check some tools that aren't included in `x check` by default, to
   8 |       # ensure that maintainers can still do check builds locally.
   9 | >>>   python3 ../x.py check"
  10 |
  11 |     CMD ["printenv"]
--------------------
ERROR: failed to build: failed to solve: dockerfile parse error on line 9: unknown instruction: python3
  1. This does not work as it compiles with the comment inline:
ENV SCRIPT_TARGET="#Check some tools that aren't included in `x check` by default, to \
  # ensure that maintainers can still do check builds locally.
  python3 ../x.py check"
SCRIPT_TARGET=#Check some tools that aren't included in `x check` by default, to   python3 ../x.py check
  1. This works, moving the comment:
# Check some tools that aren't included in `x check` by default, to
# ensure that maintainers can still do check builds locally.
ENV SCRIPT_TARGET="python3 ../x.py check"
SCRIPT_TARGET=python3 ../x.py check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants