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

arbitrary file type selectors #32

Open
PhilipDeegan opened this issue Aug 6, 2024 · 5 comments
Open

arbitrary file type selectors #32

PhilipDeegan opened this issue Aug 6, 2024 · 5 comments

Comments

@PhilipDeegan
Copy link

Hi,

I'm trying to use this with the ROCM HIP/Thrust code base from AMD, but it seems to be having issues with sources like "ABC.inl"

I'm trying to configure a custom selector, but modifying the default to include source.inl | but I'm not sure it's enough

any tips would be appreciated

thanks

@rwols
Copy link
Member

rwols commented Aug 6, 2024

In-line include files are usually not compible as standalone compilation units. The design of clangd requires this, so it won’t work well with those type of files.

@PhilipDeegan
Copy link
Author

it appears to propagate an issue to the my original source which includes it indirectly, is there someway to disregard errors in unrelated files, assuming I'm not using any symbols declared within?

@rwols
Copy link
Member

rwols commented Aug 6, 2024

What is the error you're seeing?

@PhilipDeegan
Copy link
Author

I'm seeing a few, but I have a feeling that one is caused by the other other

Thrust from AMD has some optional CUDA compatibility, which I am not using, yet clangd LSP is saying it can't find some cuda related header (cub specifically). When I compile normally, I do not get such an error.
It's quite possible I'm missing some defines in my .clangd file which the hipcc compiler expects.

The other error I'm seeing, which I don't really get, and it only appears in thrust headers, is cstddef header not found

but I can include it my own source and LSP shows me the correct gcc header

image

I don't really want to have LSP analyse .inl files, but are they still used as part of the AST for other files?

@PhilipDeegan
Copy link
Author

Also, since I've switched from compile_flags.txt to .clangd

relative includes from the project root directory no longer work, as I'm guessing, the working directory is changing to the source file directory, when the relative imports are no from there, maybe this could be separate issue, or you have some idea to support relative includes from the root project directory (where .sublime.project... are)

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

No branches or pull requests

2 participants