Open
Description
Bug Report
Discovered via mkdocstrings/crystal#10.
I have a class:
class Foo
def run
1
end
end
That's in a directory structure like:
testing/
├── foo.cr
└── sub-dir
Generating docs for this type from the parent of testing/
, the reported location of Foo#run
is:
$ crystal docs --format=json --project-name= --project-version= --source-refname=master ./testing/foo.cr | oq '.program.types[0].instance_methods[0].location'
{
"filename": "testing/foo.cr",
"line_number": 2,
"url": null
}
From within testing/
:
$ crystal docs --format=json --project-name= --project-version= --source-refname=master ./foo.cr | oq '.program.types[0].instance_methods[0].location'
{
"filename": "foo.cr",
"line_number": 2,
"url": null
}
But running it from testing/sub-dir
:
$ crystal docs --format=json --project-name= --project-version= --source-refname=master ../foo.cr | oq '.program.types[0].instance_methods[0].location'
null
Fails to determine the location. Versus having the filename be ../foo.cr
?
I'm not sure if this is expected or not, but at least wanted to bring it up to see what other's thoughts are.