Closed vaivaswatha closed 4 years ago
Thanks!
It's slightly better than the previous one, but there is still 2 traversals if the user is using compile_flags.txt
.
I'm pretty one call to locate-dominating-file
is sufficient, can you try that?
Thanks! It's slightly better than the previous one, but there is still 2 traversals if the user is using
compile_flags.txt
. I'm pretty one call tolocate-dominating-file
is sufficient, can you try that?
Done.
Just a thought, as I feel like this could simplify the code even further (but could be wrong).
Can you throw
from the locate-dominating-file
function, and return the value if you catch any?
Also, I would favor looking for .compile_flags.txt
first, as it is now a somewhat standard file, documented by Clang itself.
If you don't think it's worth it, I'm ok merging the code as-is.
Just a thought, as I feel like this could simplify the code even further (but could be wrong).
Can you
throw
from thelocate-dominating-file
function, and return the value if you catch any? Also, I would favor looking for.compile_flags.txt
first, as it is now a somewhat standard file, documented by Clang itself.If you don't think it's worth it, I'm ok merging the code as-is.
Pushed both the changes you suggested.
Great!
I think the last thing that could have been improved is the double-ifs.
Using a when
, cond
or maybe pcase
could make this part slightly more succinct.
Thank you for your time and effort. :+1:
This addresses the comment in #505, which looks to be abandoned.
Closes #489.