Let's say I'm writing a plugin for a preprocessor language of my choice which can import files by relative file path. My directory layout looks like:
root/
lib/
other.file
src/
main.file
and main.file imports other.file and I need to compile the tree rooted at root/src. What is the recommended behaviour in this case?
My plugin doesn't know what the original path of main.file is -- it only knows the path to its input nodes (which are in tmp). In this case, it can't find other.file (which is being imported as e.g. ../lib/other.file). Is the intended behaviour for the compilation to fail? Is there a way we can get the original file paths, or annotate the input nodes with those paths?
Let's say I'm writing a plugin for a preprocessor language of my choice which can import files by relative file path. My directory layout looks like:
and
main.file
importsother.file
and I need to compile the tree rooted atroot/src
. What is the recommended behaviour in this case?My plugin doesn't know what the original path of
main.file
is -- it only knows the path to its input nodes (which are intmp
). In this case, it can't findother.file
(which is being imported as e.g.../lib/other.file
). Is the intended behaviour for the compilation to fail? Is there a way we can get the original file paths, or annotate the input nodes with those paths?