Skip to content
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

Checking if a file belongs in --traversal does not account for relative paths. #425

Closed
teo-tsirpanis opened this issue Mar 2, 2023 · 2 comments · Fixed by #430
Closed

Comments

@teo-tsirpanis
Copy link
Contributor

Repro (the same I had sent on Discord)

The file tiledb\api\c_api\vfs\vfs_api_external.h has an #include "..\context\context_api_external.h" in it. All header files in the tiledb directory are passed to the tool via --traverse, but the tool sees the path tiledb\api\c_api\vfs\..\context\context_api_external.h, does not resolve the relative path and does not find it in the list, and skips context_api_external.h.

@tannergooding
Copy link
Member

This should likely be a relatively easy fix.

I imagine we just need to extend IsIncludedFileOrLocation to also check _config.TraversalNames.Contains(Path.GetFullPath(...))

or alternatively to have PInvokeGeneratorConfiguration implicitly add the full path as an alternative to the set.

The latter is a bit more up-front cost but is overall more extensible and could be handled as part of the AddRange in the property init

@teo-tsirpanis
Copy link
Contributor Author

Thanks for fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants