-
Notifications
You must be signed in to change notification settings - Fork 2
Normalize relative paths in compile_commands.json #4
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
base: develop
Are you sure you want to change the base?
Conversation
`compile_commands.json` could refer to files as relative path to the specified directory, which could be different to where the script is being executed from
@gnail sorry for not getting back to you earlier - been a bit busy... checking out your branch and running the test locally leads to failing tests now
|
Yea I've talked about this in the original post. IMO the current unit tests are not sustainable as it tests both Windows & POSIX paths but |
Oftentimes the script location is different to
compile_commands.json
and relative paths don't make sense once the.lnt
file has been generated. We can get around this by normalizing the paths as part of processing.However, this does break the current unit tests. Specifically, since
os.path
is platform dependent it only works if the paths match the executing platform, so we can't easily satisfy unit tests for both Windows and Linux path styles. What do you think we should do?