docr icon indicating copy to clipboard operation
docr copied to clipboard

docr add crystal 1.9.2 failed.

Open zw963 opened this issue 2 years ago • 1 comments

 ╰─ $ docr add crystal 1.9.2
(i) importing crystal version 1.9.2
(i) fetching available versions...
(!) crystal version 1.9.2 is not available
(!) run 'docr check' to see available versions of imported libraries

 ╰─ $ crystal version
Crystal 1.9.2 [1908c816f] (2023-07-19)

LLVM: 15.0.7
Default target: x86_64-pc-linux-gnu

Current Crystal version is 1.9.2, was compiled on my local with document.

In fact, docr check command not available too.

zw963 avatar Aug 04 '23 04:08 zw963

This seems to be an issue with how Docr looks up Crystal versions: instead of fetching them from the API on every request, it saves the available versions in the Docr cache. Some sort of flag would be ideal here to force fetch from the API so that this doesn't happen again.

The docr check message was a debug message that slipped though, it indeed doesn't refer to any command yet but will in the future.

devnote-dev avatar Aug 04 '23 05:08 devnote-dev

Version caching was changed in 9b18e094bb43ec9d5faeb72f4e8b9390f293c928 to always fetch on latest or uncached. docr check is also now available.

devnote-dev avatar Oct 13 '24 09:10 devnote-dev

Hi, i checked on latest main branch, it includes 9b18e09, but, none of them work.

 ╰──➤ $ docr add crystal 1.14.0
(i) importing crystal version 1.14.0
(i) fetching available versions...
(!) crystal version 1.14.0 is not available
(!) run 'docr check' to see available versions of imported libraries

 ╰──➤ $ docr check
Error: unknown command "check" for "docr"
Run 'docr --help' for usage.

I built use a4449b8

zw963 avatar Oct 14 '24 04:10 zw963