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

Generated Docset doesn't "load" when running on stable #14

Closed
mnmaraes opened this issue Dec 30, 2019 · 9 comments · Fixed by #15
Closed

Generated Docset doesn't "load" when running on stable #14

mnmaraes opened this issue Dec 30, 2019 · 9 comments · Fixed by #15
Labels
T: bug Something isn't working
Milestone

Comments

@mnmaraes
Copy link

mnmaraes commented Dec 30, 2019

Describe the bug
After installing the created docset and visiting any page, the documentation is either missing or displays a Loading Content... indicator

To Reproduce
I've tried running cargo docset --all at the root of my workspace on stable (1.40). Same thing happens if I try to generate docsets for individual projects (with cargo docset)

Expected behavior
The full documentation should be displayed

Screenshots
Screen Shot 2019-12-30 at 7 10 29 PM
Screen Shot 2019-12-30 at 7 12 59 PM

Desktop (please complete the following information):

  • OS: macOS 10.15.1
  • Documentation browser [e.g. dash, zeal]: Dash
  • Version: 5.0.3

Additional context
Not context, just a comment: Thanks for your work on this. Let me know if I can assist in fixing

@mnmaraes
Copy link
Author

Funnily enough, if I use vim to open the local html files generated by cargo doc, they're complete. So this couldn't be an issue with the page's js not running

@Robzz
Copy link
Owner

Robzz commented Jan 3, 2020

Thank you for the report, I will take a look at this tomorrow.

@Robzz Robzz added the T: bug Something isn't working label Jan 3, 2020
@Robzz Robzz added this to the v0.2.0 milestone Jan 3, 2020
@Robzz
Copy link
Owner

Robzz commented Jan 6, 2020

Sorry, took a bit longer than I would have liked to get to it. I just tried rebuilding cargo-docset with the latest stable and generating a docset for tokio and opening it in Zeal, it seems to work, so we have a different behaviour between Zeal and Dash.

I had the same hunch as you did and figured it must be some javascript not running. That's where it gets weird, even when disabling all javascript it my browser, I get something more complete than that. I still think this is JS related, but... Weird.

The only idea I have is this. I haven't needed it so far, but please try removing the docset from dash, adding the line <key>isJavaScriptEnabled</key><true/> to the generated info.plist within the property dict and reinstalling the docset. If it fixes it, I'll update the generated info.plist file. If it doesn't, please post the full info.plist file you modified for me to double check.

@mnmaraes
Copy link
Author

mnmaraes commented Jan 6, 2020

Yep. Adding the .plist entry has fixed the issue

Good catch! Thanks

@Robzz
Copy link
Owner

Robzz commented Jan 6, 2020

Okay, will add the entry and publish a new release shortly. Thank you :)

@saskenuba
Copy link

saskenuba commented Jan 12, 2020

Weirdly enough I have the same issue even with the js fix applied, but on Zeal(git master). For a struct, the methods and traits sections are not rendered. And for the traits pages, there is this "Loading Content" message. But if I just right-click to open with desktop browser they fully show up.

The crate tested was: ws-rs, perhaps you can test it on your side?

Upon some investigation, I renamed rustdoc.css on <crate>.docset/contents/resources to something else, and the whole document rendered. My best guess is that the browser engine used on zeal is outdated (maybe those flexboxes classes used on the CSS?) because apparently they are having other issues related to rendering.

The rust docs available for download on zeal have the display: block at the sections I mentioned, instead of the display: flexbox.

@Robzz
Copy link
Owner

Robzz commented Jun 19, 2020

Sorry, I've been AWOL for a 'little' while and just noticed this. I'll try and verify this in the coming days.

@Robzz Robzz reopened this Jun 19, 2020
@Robzz Robzz modified the milestones: v0.2.0, v0.3.0 Jun 21, 2020
@Robzz
Copy link
Owner

Robzz commented Jun 21, 2020

I can indeed verify this using Zeal v0.6.1, and renaming rustdoc.css indeed gets the section to render (although it mangles the document pretty bad). I'll search for a workaround.

@Robzz
Copy link
Owner

Robzz commented Jun 21, 2020

This seems to be fixed in Zeal master 🎉 Most likely fixed by zealdocs/zeal#1125.

@Robzz Robzz closed this as completed Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants