-
Notifications
You must be signed in to change notification settings - Fork 0
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
Canonicalize input paths in source rewriter #479
Conversation
We might prefer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this already done in #432?
Oh weird you're right. I'm pretty sure I've synced and rebuilt IA2 since then, so I'm not sure why I was still seeing issues with relative paths. I'll dig into it on my end, maybe I just didn't have the latest version if IA2. |
Seems like the logic added in #432 isn't correctly canonicalizing
It looks like
|
Does it need to fully canonicalized them or just make them absolute? If we need full canonicalization, can you fix #432 to use the canonicalization function instead? Either LLVM's if it has one or |
I think it has to be canonical because we compare with paths we get from querying clang for things. |
This fixes some issues with the rewriter when non-canonical paths are specified for the root or output directories.
3ccaad1
to
dd23c93
Compare
Ah, let's canonicalize then. |
Yeah I'm seeing bad behavior from the rewriter (e.g. trying to copy files to the wrong directory) with the current absolute path logic. Things only seem to work with a fully canonicalized path. I've updated the PR to use |
Make
RootDirectory
andOutputDirectory
canonical paths immediately after reading CLI args. #432 makes them absolute, but we need them to be fully canonical to reliably compare.