Normalize relative paths in compile_commands.json#4
Open
gnail wants to merge 3 commits intossproessig:developfrom
Open
Normalize relative paths in compile_commands.json#4gnail wants to merge 3 commits intossproessig:developfrom
gnail wants to merge 3 commits intossproessig:developfrom
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
Owner
|
@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 |
Contributor
Author
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Oftentimes the script location is different to
compile_commands.jsonand relative paths don't make sense once the.lntfile 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.pathis 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?