Skip to content

Conversation

dan-zheng
Copy link
Contributor

Fix "Title underline too short" errors:

Warning, treated as error:
/Users/danielzheng/swift-dev/swift/docs/SIL.rst:5604:Title underline too short.

differentiable_function
`````````````````
make: *** [/Users/danielzheng/swift-dev/build/Xcode-ReleaseAssert+swift-DebugAssert/swift-macosx-x86_64/docs/CMakeFiles/docs_html] Error 2
Command /bin/sh failed with exit code 2

Todo: install Sphinx on TensorFlow CI machines to catch these errors.

@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Oct 2, 2019
@dan-zheng dan-zheng requested a review from rxwei October 2, 2019 00:11
@rxwei
Copy link
Contributor

rxwei commented Oct 2, 2019

Feel free to merge without running CI.

@dan-zheng
Copy link
Contributor Author

Installed Sphinx on all three CI machines to catch .rst errors in the future.

$ sudo apt-get install python3-sphinx
$ brew install sphinx-doc

@dan-zheng
Copy link
Contributor Author

Feel free to merge without running CI.

I don't plan to land other patches soon so I'll start CI.

@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

@burmako
Copy link

burmako commented Oct 2, 2019

Looks like another legitimate error, also in an .rst file:

Warning, treated as error:
/Users/swiftci/jenkins/workspace/swift-PR-TensorFlow-macOS/swift/docs/ARCOptimization.rst:100:Pygments lexer name 'sil' is not known

@dan-zheng
Copy link
Contributor Author

dan-zheng commented Oct 2, 2019

macOS CI now fails with:

Warning, treated as error:
/Users/swiftci/jenkins/workspace/swift-PR-TensorFlow-macOS/swift/docs/ARCOptimization.rst:100:Pygments lexer name 'sil' is not known

Investigating briefly, it seems others have ran into it here. If it's not easily fixable, I'll uninstall sphinx from the macOS CI machine.


EDIT: I tried sphinx installed via pip3 install sphinx and brew install sphinx-doc on the macOS machine but both failed with the same error: Pygments lexer name 'sil' is not known. Uninstalling sphinx to unblock progress - it seems to run fine on Ubuntu CI at least.

@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow macOS

Fix "Title underline too short" errors.

Sphinx has been installed on TensorFlow Ubuntu CI machines to catch doc errors.
Sphinx is not installed on the macOS CI machine because doc building fails:
`Pygments lexer name 'sil' is not known`.
This failure occurred only on the macOS CI machine: reproducing locally did not
work. It may have been introduced in swiftlang#27471
but leaked through because the macOS CI machine was down at the time of testing.
@dan-zheng
Copy link
Contributor Author

macOS CI fails with a super weird error:

/Users/swiftci/jenkins/workspace/swift-PR-TensorFlow-macOS/swift/test/AutoDiff/differentiable_function_silgen.swift:35:15: error: CHECK-AST: expected string not found in input
// CHECK-AST: (function_conversion_expr implicit type='@differentiable (Float) -> (Float)'
              ^
<stdin>:69:110: note: scanning from here
 (func_decl range=[SOURCE_DIR/test/AutoDiff/differentiable_function_silgen.swift:23:1 - line:25:1] "apply()" interface type='() -> ()' access=internal
                                                                                                             ^
<stdin>:79:2: note: possible intended match here
 (differentiable_function implicit type='@differentiable (Float) -> Float' location=SOURCE_DIR/test/AutoDiff/differentiable_function_silgen.swift:24:18 range=[SOURCE_DIR/test/AutoDiff/differentiable_function_silgen.swift:24:18 - line:24:18]
 ^

I ssh'd into the macOS CI machine and found that the RUN line produces the following -dump-ast output:

(function_conversion_expr implicit type
='@differentiable (Float) -> (Float)'

Note the newline after (function_conversion_expr implicit type: it is what causes the FileCheck error. I believe it is fixed in 8397226, verified on the macOS CI machine. The error probably leaked through because macOS CI was down for #27471.

@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

@dan-zheng dan-zheng merged commit 62d9333 into swiftlang:tensorflow Oct 2, 2019
@dan-zheng dan-zheng deleted the fix-sil-rst branch October 2, 2019 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tensorflow This is for "tensorflow" branch PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants