Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve message when docs are out-of-date. #1194

Merged
merged 1 commit into from
Jun 22, 2021
Merged

Conversation

alexeagle
Copy link
Contributor

Checking in generated build artifacts makes things harder for contributors. The get a red CI status but have to know to look at the definition of the diff_test target to discover there's a command to auto-update. Instead we just print that command on failure.

The failure now looks like this:

$ bazel test //doc:all
INFO: Analyzed 9 targets (0 packages loaded, 0 targets configured).
INFO: Found 9 test targets...
FAIL: //doc:check_ios.doc (see /home/alexeagle/.cache/bazel/_bazel_alexeagle/32c0f21b6a1d2ed917381b593d4bcb34/execroot/build_bazel_rules_apple/bazel-out/k8-fastbuild/testlogs/doc/check_ios.doc/test.log)
INFO: From Testing //doc:check_ios.doc:
==================== Test output for //doc:check_ios.doc:
393c393
< | <a id="ios_sticker_pack_extension-entitlements"></a>entitlements |  The entitlements file required for device builds of this target. If absent, the default entitlements from the provisioning profile will be used.<br><br>The following variables are substituted in the entitlements file: <code>$(CFBundleIdentifier)</code> with the bundle ID of the application and <code>$(AppIdentifierPrefix)</code> with the value of the <code>ApplicationIdentifierPrefix</code> key from the target's provisioning profile.   | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
---
> | <a id="ios_sticker_pack_extension-entitlements"></a>entitlements |  The entitlements file required for device builds of this target. If absent, the default entitlements from the provisioning profile will be used.<br><br>The following variables are substituted in the entitlements file: <code>$(CFBundleIdentifier)</code> with the bundle ID of the application and <code>$(AppIdentifierPrefix)</code> with the value of the <code>ApplicationIdentifierPrefixe</code> key from the target's provisioning profile.   | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
FAIL: files "doc/ios.doc.md" and "doc/rules-ios.md" differ.
Please update the docs by running
    bazel run //doc:update
================================================================================
INFO: Elapsed time: 0.067s, Critical Path: 0.02s

@google-cla google-cla bot added the cla: yes label Jun 20, 2021
@keith
Copy link
Member

keith commented Jun 21, 2021

the failure appears related

Checking in generated build artifacts makes things harder for contributors. The get a red CI status but have to know to look at the definition of the diff_test target to discover there's a command to auto-update. Instead we just print that command on failure.

The failure now looks like this:

```
$ bazel test //doc:all
INFO: Analyzed 9 targets (0 packages loaded, 0 targets configured).
INFO: Found 9 test targets...
FAIL: //doc:check_ios.doc (see /home/alexeagle/.cache/bazel/_bazel_alexeagle/32c0f21b6a1d2ed917381b593d4bcb34/execroot/build_bazel_rules_apple/bazel-out/k8-fastbuild/testlogs/doc/check_ios.doc/test.log)
INFO: From Testing //doc:check_ios.doc:
==================== Test output for //doc:check_ios.doc:
393c393
< | <a id="ios_sticker_pack_extension-entitlements"></a>entitlements |  The entitlements file required for device builds of this target. If absent, the default entitlements from the provisioning profile will be used.<br><br>The following variables are substituted in the entitlements file: <code>$(CFBundleIdentifier)</code> with the bundle ID of the application and <code>$(AppIdentifierPrefix)</code> with the value of the <code>ApplicationIdentifierPrefix</code> key from the target's provisioning profile.   | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
---
> | <a id="ios_sticker_pack_extension-entitlements"></a>entitlements |  The entitlements file required for device builds of this target. If absent, the default entitlements from the provisioning profile will be used.<br><br>The following variables are substituted in the entitlements file: <code>$(CFBundleIdentifier)</code> with the bundle ID of the application and <code>$(AppIdentifierPrefix)</code> with the value of the <code>ApplicationIdentifierPrefixe</code> key from the target's provisioning profile.   | <a href="https://bazel.build/docs/build-ref.html#labels">Label</a> | optional | None |
FAIL: files "doc/ios.doc.md" and "doc/rules-ios.md" differ.
Please update the docs by running
    bazel run //doc:update
================================================================================
INFO: Elapsed time: 0.067s, Critical Path: 0.02s
```
@alexeagle
Copy link
Contributor Author

added the patch into the "HEAD" version of bazel-skylib as well. Not sure if we have much chance of getting the upstream PR merged? We could sit on this one a few more days and see if we get the new attribute added to bazel-skylib at HEAD...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants