Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Cannot install cpp documentation #71

Open
nitnelave opened this issue Jan 16, 2024 · 4 comments
Open

Cannot install cpp documentation #71

nitnelave opened this issue Jan 16, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@nitnelave
Copy link

Running :DevdocsInstall cpp gives me:

[nvim-devdocs] Plugin initialized
[nvim-devdocs] Installing required docs
[nvim-devdocs] cpp docs is too large (41709474)
[nvim-devdocs] Fetching cpp documentation entries...
[nvim-devdocs] Downloading cpp documentation...
Error executing vim.schedule lua callback: Vim:E474: Expected string end: {"index":"<h1>C++ Programming Language</h1>                 <p>The interface of C++ standard library is defined by the following collection of headers.</p>\n<table class=\"t-dsc-begin\"> <tr> <td colspan=\"2\">  <h3 id=\"Concepts_library\"> Concepts library</h3> </td>\n</tr> <tr class=\"t-dsc\"> <td> <div><a href=\"header/concepts\" title=\"cpp/header/concepts\"> <span class=\"t-lines\"><span>&lt;concepts&gt;</span></span></a></div>\n<div><span class=\"t-lines\"><span><span class=\"t-mark-rev t-since-cxx20\">(C++20)</span></span></span></div> </td> <td> <a href=\"concepts\" title=\"cpp/concepts\">Fundamental library concepts</a> </td>\n</tr> <tr> <td colspan=\"2\"> <h3 id=\"Coroutines_library\"> Coroutines library</h3> </td>\n</tr> <tr class=\"t-dsc\"> <td> <div><a href=\"header/coroutine\" title=\"cpp/header/coroutine\"> <span class=\"t-lines\"><span>&lt;coroutine&gt;</span></span></a></div>\n<div><span class=\"t-lines\"><span><span class=\"t-mark-rev t-since-cxx20\">(C++20)</span>
stack traceback:
	[C]: in function 'json_decode'
	...e/nvim/lazy/nvim-devdocs/lua/nvim-devdocs/operations.lua:72: in function ''
	vim/_editor.lua: in function <vim/_editor.lua:0>

neovim version: 0.9.2
nvim-devdocs just installed from git.

@nitnelave
Copy link
Author

(also, the "ensure_installed" config key doesn't seem to do anything. Nothing gets installed at startup, and :checkhealth says WARNING {nvim-devdocs}: unknown key <ensure_installed>)

@nitnelave
Copy link
Author

The error seems to imply that a string in the returned JSON is not closed by the time we reached the end. Maybe the output is truncated? What does "cpp docs is too large" imply?

@luckasRanarison luckasRanarison added the bug Something isn't working label Jan 25, 2024
@luckasRanarison
Copy link
Owner

It looks like it's an issue with curl, as you said the output was truncated resulting in an invalid JSON. "large docs" exceed 10Mb but some docs are really big, according to the devdocs website CPP docs is about 41Mb. curl probably failed to download.
I haven't configured a checkhealth though, and I can't reproduce it.

@nitnelave
Copy link
Author

Yeah, after some investigation, it only happens on my company's network. I pulled it at home, packed the devdocs folder into an archive and sent it to my work computer to unpack there. It's not great, but it's a workaround.

I'll leave it to you whether to close the bug or not, given that I can't give you a reproduction.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants