-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Nim doc fail to run for nim 1.2.0 (nim 1.0.4 is ok) #13986
Comments
I've tried to reproduce by running the exact command you provided (because when I tried it with my packages there was no problem), but it turns out that for me The only difference is that I'm not using |
Cant repro. |
jester breaks
|
Ok, if issue cannot reproduce then it's can close. |
It doesn't work here either. This is true for any neem code or package. The problem does not occur in version 1.0.0. Example: I am inside the folder of the source code of my iputils package and I type: Output devel:
In version 1.0.0:
|
really hard to investigate a bug that I can't reproduce;
in the same folder, what's the output for:
|
I think I figured it out! from looking at ur example, that regression seems to happen when nim is installed in some drive eg note that the bug (or some other related bug) might be pre-existing to the regression, and the regression would only be a symptom. But the root cause should be fixable. |
The link to the iputils package I used is this one: https://github.com/rockcavera/nim-iputils
That's right! I just tested here. My Nim is installed in D:, when I do |
I encountered the same issue. And then I found where is the bug. proc presentationPath*(conf: ConfigRef, file: AbsoluteFile, isTitle = false): RelativeFile =
# omit...
template bail() =
result = relativeTo(file, conf.projectPath) I change it to: template bail() =
echo "relativeTo(", file, ", ", conf.projectPath, ") = ", relativeTo(file, conf.projectPath)
result = relativeTo(file, conf.projectPath) The output:
It is obviously, the following code assume |
import os
proc main()=
let a = r"C:\Users\user\.nimble\pkgs\winim-3.3.3\winim\lean.nim"
let b = r"D:\nim"
echo isRelativeTo(a, b)
echo relativePath(a, b)
static: main()
has a bug indeed when drives differ on windows.
@khchen I'm not a windows user so it may be easier for you, if you feel like contributing some bug fixes for windows? I wonder if it's possible to invent a more arbitrarily complex system than window's path handling. sources
|
@khchen @timotheecour Thanks for find the root cause and explain in detail. |
bug fixes can introduce regressions for use cases that weren't being tested. If you use code from 1.0 you'll undo the bugfixes. |
When I run
nim doc WHATEVER.nim
it's errorExample
Current Output
Expected Output
Possible Solution
Additional Information
The text was updated successfully, but these errors were encountered: