Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove/update lines causing build failures #8009

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

Merged
merged 1 commit into from
Jun 18, 2017

Conversation

robfrawley
Copy link
Contributor

@robfrawley robfrawley commented Jun 8, 2017

This pull request amends the invalid code blocks within the documentation to fix the build errors (both locally and on platform.sh). Additionally, this normalizes the dependency installation and build calls executed by both travis and platform.sh so they both use the same environment to build the documentation. This is important as currently, often one will fail while the other will succeed; this should not ever happen and they should both either fail or succeed.

See #8004 (comment) and #8004 (comment) for the origin story.

Note: This should likely be applied to the 3.3 branch which is where the errors originate, will update the target branch once this is confirmed.

@robfrawley
Copy link
Contributor Author

robfrawley commented Jun 8, 2017

Some interesting notes:

  • Using sphinx@1.3 allows the documentation to build withOUT error
  • Using sphinx@1.4 prints the invalid literal blocks WITH warnings
  • Using sphinx@1.5 stops on the invalid literal blocks WITH error (stopping build on first invalid block)

Sphinx 1.3 Behavior
The documentation build is successful.

Sphinx 1.4 Behavior
The documentation build prints warnings.

/home/rmf/repositories/docs/symfony-docs/controller/argument_value_resolver.rst:162: WARNING: Could not lex literal_block as "xml". Highlighting skipped.                                                          
/home/rmf/repositories/docs/symfony-docs/controller/error_pages.rst:283: WARNING: Could not lex literal_block as "xml". Highlighting skipped.                                                                      
/home/rmf/repositories/docs/symfony-docs/controller/upload_file.rst:389: WARNING: Could not lex literal_block as "xml". Highlighting skipped.                                                                      
/home/rmf/repositories/docs/symfony-docs/profiler/data_collector.rst:243: WARNING: Could not lex literal_block as "xml". Highlighting skipped.                                                                     
/home/rmf/repositories/docs/symfony-docs/security/api_key_authentication.rst:432: WARNING: Could not lex literal_block as "xml". Highlighting skipped.                                                             
/home/rmf/repositories/docs/symfony-docs/service_container/configurators.rst:144: WARNING: Could not lex literal_block as "xml". Highlighting skipped.                                                             
/home/rmf/repositories/docs/symfony-docs/service_container/expression_language.rst:22: WARNING: Could not lex literal_block as "yaml". Highlighting skipped.

Sphinx 1.5 Behavior
The documentation build stops on first error.

writing output... [ 34%] controller/argument_value_resolver                                                                                                                                                        
Exception occurred:
  File "/home/rmf/.ve/local/lib/python2.7/site-packages/sphinx/highlighting.py", line 147, in highlight_block
    type='misc', subtype='higlighting_failure')
TypeError: warner() got an unexpected keyword argument 'type'

Where to Go From Here?
So we have some options before us:

What direction do you guys want to take? Any thoughts?

@xabbuh
Copy link
Member

xabbuh commented Jun 9, 2017

The best option IMO would be to fix the code examples and then use Sphinx >= 1.5 to see this as soon as possible during Travis builds.

@robfrawley
Copy link
Contributor Author

robfrawley commented Jun 9, 2017

There is one additional complication when choosing this option: warnings are thrown by sphinx-php when it overwrites the code-block directive, and these warnings are turned into errors due to the -nW flags passed to sphinx during the Travis build.

As far as I can tell, there are no alternatives for sphinx-php to overwrites directives, so the warning is the current expected behavior for sphinx when this occurs (and if there was a way for sphinx-php to handle this differently, there doesn't seem much interested in doing so: #7402 (comment), #7422, fabpot/sphinx-php#33).

This means we can't use the "turn warnings into errors" flags (-nW) when building the documentation on Travis.

@robfrawley robfrawley changed the title [WIP] Remove lines causing build failures [WIP] Remove lines causing build failures and align travis and platform.sh build Jun 10, 2017
@robfrawley robfrawley force-pushed the bug-fix-build-errors branch from ab7dcdb to 4a22ca9 Compare June 10, 2017 03:11
@robfrawley robfrawley changed the base branch from master to 3.3 June 10, 2017 03:11
@robfrawley robfrawley force-pushed the bug-fix-build-errors branch from 4a22ca9 to 686a827 Compare June 10, 2017 03:14
@robfrawley
Copy link
Contributor Author

robfrawley commented Jun 10, 2017

Rebased onto 3.3, added a subset of the changes from #8010 to align Travis and platform.sh build so they both use identical environments, and removed extra spaces from #8014 (and then squashed commits). Also, per @xabbuh I've closed #8010. We still cannot use sphinx@1.4 (or any greater version) due to the issues explained in #8009 (comment).

@robfrawley
Copy link
Contributor Author

robfrawley commented Jun 11, 2017

Is there anything about this PR that should be changed? We should get builds working...

@xabbuh
Copy link
Member

xabbuh commented Jun 12, 2017

Is the 3.3 the lowest branch that contains these wrong code examples (I mean we should fix them on every branch)?

@xabbuh
Copy link
Member

xabbuh commented Jun 12, 2017

Oh and changes to our build infrastructure should be made in the 2.7 branch to have consistent builds throughout all pull requests.

@robfrawley robfrawley changed the title [WIP] Remove lines causing build failures and align travis and platform.sh build [WIP] Remove lines causing build failures Jun 12, 2017
@robfrawley robfrawley changed the title [WIP] Remove lines causing build failures [WIP] Remove/update lines causing build failures Jun 12, 2017
@robfrawley robfrawley changed the title [WIP] Remove/update lines causing build failures Remove/update lines causing build failures Jun 12, 2017
@robfrawley
Copy link
Contributor Author

Yes, the 3.3 branch is the lowest branch where these issues were introduced (they were mainly introduced with the autowire pull requests), short of some of the extra spaces removed, which may be in lower branches. I will open a new PR with the build changes against 2.7 and update this PR to remove them.

@@ -254,7 +254,6 @@ to specify a tag that contains the template:
<tag name="data_collector"
template="data_collector/template.html.twig"
id="app.request_collector"
<!-- priority="300" -->
Copy link
Member

Choose a reason for hiding this comment

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

this should now be added as a comment before the tag element

Copy link
Contributor Author

@robfrawley robfrawley Jun 12, 2017

Choose a reason for hiding this comment

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

Updated as requested.

@xabbuh xabbuh added this to the 3.3 milestone Jun 12, 2017
@robfrawley robfrawley force-pushed the bug-fix-build-errors branch from a10e9c3 to 18ee5e2 Compare June 12, 2017 20:37
@robfrawley
Copy link
Contributor Author

Ok; split out build environment changes into #8030 and squashed commits here with requested changes.

weaverryan added a commit that referenced this pull request Jun 13, 2017
…frawley)

This PR was merged into the 2.7 branch.

Discussion
----------

Fix and align travis and platform build environments

This pull request fixes the `platform.sh` deploy and aligns the `platform.sh` and `travis-ci.org` build to use the same version constraints and environments. Per @xabbuh in #8009 (comment) this PR has been made against the `2.7` branch. Original implementation pulled from #8010 and #8009. Changes include:

- Update the `pip` version requirements pulled in by [_build/.requirements.txt](https://github.com/robfrawley/symfony-docs/blob/feature-align-travis-and-platform-build/_build/.requirements.txt) to latest releases, except for `sphinx` which must be downgraded to `1.3` until we find a solution for `sphinx-php` (which there doesn't seem to be much interest in fixing: #7402 (comment), #7422, fabpot/sphinx-php#33).

- Use the same package management and constraint requirements for both `platform.sh` and `travis-ci.org` by having both utilize the `_build/.requirements.txt` file when calling `pip`.

- Use the same documentation build command to compile the documentation HTML (`make`) while still calling `sphinx` with "strict mode" (or, more accurately, "turn warnings into errors mode") for `travis-ci.org`.

- On `platform.sh`, since the `vitrualenv` folder is at the documentation root, remove all `rst` files contained within it (pulled in from the `pip` packages) via a `find` command, so as to ensure the build doesn't pull them in (they would never appear in the output as they don't exist in the doctree, but if they contain errors or other inconsistencies, this could cause the build to fail while reading in their sources).
  - `find .virtualenv -type f -name "*.rst" -delete`

Commits
-------

764bc37 align travis and platform build environments
@xabbuh
Copy link
Member

xabbuh commented Jun 18, 2017

Thank you @robfrawley.

@xabbuh xabbuh merged commit 18ee5e2 into symfony:3.3 Jun 18, 2017
xabbuh added a commit that referenced this pull request Jun 18, 2017
This PR was merged into the 3.3 branch.

Discussion
----------

Remove/update lines causing build failures

This pull request amends the invalid code blocks within the documentation to fix the build errors (both locally and on `platform.sh`). ~~Additionally, this normalizes the dependency installation and build calls executed by both `travis` and `platform.sh` so they both use the same environment to build the documentation. _This is important as currently, often one will fail while the other will succeed; this should not ever happen and they should both either fail or succeed._~~

See #8004 (comment) and #8004 (comment) for the origin story.

~~*Note: This should likely be applied to the `3.3` branch which is where the errors originate, will update the target branch once this is confirmed.*~~

Commits
-------

18ee5e2 fix invalid code lines and remove extra space
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.