[PATCH] D151963: [clang][NFC] Remove trailing whitespaces and enforce it in lib, include and docs

Eduard Zingerman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 30 07:40:46 PDT 2023


eddyz87 added inline comments.


================
Comment at: libcxx/utils/ci/buildkite-pipeline-clang.yml:20-31
+  - label: "Format"
+    commands:
+      - "! grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs || false"
+
+    agents:
+      queue: "libcxx-builders"
+      os: "linux"
----------------
ldionne wrote:
> Something in here broke the Clang CI. See for example https://buildkite.com/llvm-project/libcxx-ci/builds/27050#0188fe23-c359-4a1d-8d10-f0fb966f142e.
> 
> It's actually interesting, now the libc++ CI is lightning fast since we're not sharing our resources anymore. I'll follow-up on that, I never expected it to make such a huge difference.
I believe it's the following line:

```
    commands:
      - "! grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs || false"
```

buildkite-agent interpolates variables in commands and reacts to `$`, so it should be:

```
    commands:
      - "! grep -rnI '[[:blank:]]$$' clang/lib clang/include clang/docs || false"
```

Instead (note `$$`).

It is possible to test this locally using the following commands:

```
$ ./libcxx/utils/ci/generate-buildkite-pipeline > 1.ym
$ docker run -v `realpath 1.yml`:`realpath 1.yml` \
      --rm buildkite/agent:3 pipeline upload --dry-run \
      --agent-access-token xx `realpath 1.yml`
2023-06-30 14:36:35 INFO   Reading pipeline config from "/home/eddy/work/llvm-project/1.yml"
2023-06-30 14:36:35 FATAL  Pipeline parsing of "1.yml" failed (Expected identifier to start with a letter, got ')
```

The error is gone if '$$' change is applied. (But I have not tested if semantics of the command is preserved).
As far as I understand [[ https://github.com/buildkite/agent/issues/584#issuecomment-343809421 | this link ]] applies here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151963/new/

https://reviews.llvm.org/D151963



More information about the cfe-commits mailing list