Open monacofj opened 5 months ago
Oof… Using reuse from subdirectories is one of those things that requires quite a bit of plumbing, but doesn't have nearly enough in the way of tests. It's a bit of a mess, especially because there are two types of relative paths:
These are normally identical, but not always, and the bug here is probably something of that type.
Thanks for reporting.
Would anyone confirm or provide hints on the following issue.
Suppose that the project directory has the following structure:
From within the project root directory, we want to annotate
file1.py
using the custom templateproj.jinja2
.So far so good.
However, suppose we also want to annotate
file2
withinsubdir
.To have it work, he have to move up to the root directory
Intriguingly, I have another project which was cloned from a remote Git repository where the problem does not occur, which led me to wonder if the issue had something to do with
proj
not being a git repo. However, I then recreatedproj
as a Git repo, cloned it and repeated the tests only to check that the problem persists.As a note, I performed some debugging in
reuse-tool
source and could see that for my working project, the program correctly detects the project root dir (..
if I invoke reuse from a first-level subdir) , while forproj
, the program identifies the project root as the absolute path<path>proj/subidr
. I could not dig deeper in the problem, though.