-
Notifications
You must be signed in to change notification settings - Fork 174
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
Document how to recover from corrupted nimble cache #693
Comments
I recently had this error too quite often. |
Please paste the contents of these files whenever something like this happens to give us a better idea of the cause. Maybe @genotrance has an idea of what could be causing this? |
The # Package
version = "0.1.0"
author = "Hitesh Jasani"
description = "Examples using nim and D3"
license = "MIT"
srcDir = "src"
bin = @["examples"]
# Dependencies
requires "nim >= 0.20.0"
requires "karax"
from os import splitFile, addFileExt
task pages, "Build javascript pages":
if dirExists("public/js"):
rmDir("public/js")
mkDir("public/js")
for file in listfiles("src/pages/"):
let fileparts = splitFile(file)
if fileparts.ext == ".nim":
let
opts = "--hints:off"
jsfile = "public/js/" & fileparts.name.addFileExt("js")
cmd = "nim js " & opts & " -o:" & jsfile & " " & file
exec cmd I don't have this issue anymore after my workaround but if I have it again, I'll post whatever generated files I find. |
Were you going between different versions of Nim (and nimble as a result) causing you to use older versions of nimble? There are known issues that were fixed over time. If you run into this again, try updating nimble with |
@genotrance Now that you mention it, yes, I do believe that's the case. I was testing using different versions of nimble using nim 0.19.6, stable and head -- using |
Same issue with Arraymancer. I use choosenim to switch between version and ensure compatibility between stable and devel. |
The message in this issue is the same as one as I mistakenly thought it was I'll copy from there the steps I took to solve it on my end:
|
Can this be closed now? Only good outcome of all this is that people can realize that they can freely update nimble even in shipped versions of Nim and get the latest bug fixes and features. |
Worth noting that v0.20.2 that shipped on July 16th was pinned to a Nimble version from June 3rd. The fix for this issue was merged on June 11th. So basically anyone using a stable Nim as of today needs to update their Nimble with |
Closing issue - update to latest nimble as explained above. |
I somehow got a situation where my project wouldn't build and gave me the following error:
After being very confused with this error I stumbled upon the
--debug
option.Deleting the following resolved the issue and my builds succeeded again.
This kind of build failure is not easy to track down unless you know these steps. It would be nice to have nimble be more fault tolerant and not let the user get into this situation in the first place. But at the very least, this should be documented in the troubleshooting section.
The text was updated successfully, but these errors were encountered: