Skip to content

Revert "The rest of Tera" #885

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 24 commits into from
Jul 7, 2020
Merged

Revert "The rest of Tera" #885

merged 24 commits into from
Jul 7, 2020

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Jul 7, 2020

Reverts #879

This caused many regressions. I will make a list of all we know of in the comments below.

cc @Kixiron

Joshua Nelson added 24 commits July 7, 2020 17:31
This reverts commit 5c3e6ed.
This reverts commit f9ef930.
This reverts commit da71d1b.
This reverts commit e8d3768.
This reverts commit 70fdf9b.
This reverts commit 297663c.
This reverts commit 43a358f.
This reverts commit 1a58978.
This reverts commit d1bc23b.
This reverts commit 0fc0f21.
This reverts commit 754b91d.
This reverts commit d20e4cc.
This reverts commit 46254eb.
@jyn514
Copy link
Member Author

jyn514 commented Jul 7, 2020

500 internal errors on some pages, including https://docs.rs/strum/0.13.0/strum/:

Jul 07 21:22:18 docsrs cratesfyi[29806]: thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Msg("Failed to render \'rustdoc/page.html\'"), source: Some(Error { kind: Msg("Variable `dep[2]` not found in context while rendering \'rustdoc/navigation.html\': the evaluated version was `dep.2`. Maybe the index is out of bounds?"), source: None }) }', src/web/page/web_page.rs:36:24
Jul 07 21:23:50 docsrs cratesfyi[29806]:   14: cratesfyi::web::rustdoc::rustdoc_html_server_handler

Same error for crate_details:

Jul 07 21:23:53 docsrs cratesfyi[29806]: thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Msg("Failed to render \'crate/details.html\'"), source: Some(Error { kind: Msg("Variable `dep[2]` not found in context while rendering \'crate/details.html\': the evaluated version was `dep.2`. Maybe the index is out of bounds?"), source: None }) }', src/web/page/web_page.rs:36:24

@jyn514
Copy link
Member Author

jyn514 commented Jul 7, 2020

All builds were shown as failed, even if the documentation was available.

wrong-build-status

This is fixed by the following diff:

diff --git a/templates/crate/details.html b/templates/crate/details.html
index 1eeabf3..c1b6a3f 100644
--- a/templates/crate/details.html
+++ b/templates/crate/details.html
@@ -113,7 +113,7 @@
                                                 </a>
 
                                             {# If the release wasn't yanked and built correctly, display it normally #}
-                                            {%- elif release.build_status -%}
+                                            {%- elif not release.build_status -%}
                                                 <a href="/crate/{{ details.name }}/{{ release.version }}" class="pure-menu-link">
                                                     {{ release.version }}
                                                 </a>
diff --git a/templates/rustdoc/navigation.html b/templates/rustdoc/navigation.html
index 96275c0..7664f52 100644
--- a/templates/rustdoc/navigation.html
+++ b/templates/rustdoc/navigation.html
@@ -161,7 +161,7 @@
                                                                 </a>
 
                                                             {# If the release failed to build, display a warning #}
-                                                            {%- elif release.build_status -%}
+                                                            {%- elif not release.build_status -%}
                                                                 <a href="{{ release_url }}" class="pure-menu-link warn" title="docs.rs failed to build {{ release_name }}">
                                                                     <i class="fa fa-fw fa-warning"></i> {{ release.version }}
                                                                 </a>

@jyn514 jyn514 merged commit 7903abc into master Jul 7, 2020
@jyn514 jyn514 deleted the revert-879-the-rest-of-tera branch July 7, 2020 21:38
@jyn514
Copy link
Member Author

jyn514 commented Jul 7, 2020

READMEs were shown as raw HTML instead of being rendered.

image

@Nemo157
Copy link
Member

Nemo157 commented Jul 7, 2020

For https://docs.rs/actix-web-static-files/2.0.1/actix_web_static_files/index.html the non-rust codeblocks were having highlight.js styles applied, which clash badly with rustdoc dark styles. It looks like rustdoc applies the highlight.js language class, but doesn't actually load highlight.js to render it, but the new tera templates include highlight.js. I didn't get a screenshot, but should be easy to reproduce locally by building actix-web-static-files 2.0.1.

@jyn514 jyn514 mentioned this pull request Jul 7, 2020
@Kixiron
Copy link
Member

Kixiron commented Jul 7, 2020

image

@Kixiron Kixiron mentioned this pull request Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants