-
Notifications
You must be signed in to change notification settings - Fork 44
Remove .h files from compilation process #727
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: main
Are you sure you want to change the base?
Conversation
There no need to have .h files as part of compilation,since only .c files produce something of value. .h included using preprocesor if needed.
|
The general idea for their presence is that they are needed for proper incremental recompilation tracking. If you remove them from the set of dependencies, then a change in Which is, yeah, quite far from the ideal incremental tracking, but I'd say it's a quite practical solution (to do something better, we'd need to dive deep into Why do you want to remove these? Are they causing any specific problems? |
|
@kant2002 do you still think we need this? |
|
I do think we need to not feed headers into Cesium from the project. From your explanation, I think this is half backed solution, and I don't have capacity to move forward with it. |
|
I do still believe it's a correct solution. Header files should be considered as inputs of the compilation target, for correct recompilation when they change. The "tlog" approach I mentioned would give us more precise detection — so that when people include header files from outside the project, or leave certain files unused, or something else, then we still get the correct picture on recompilation. But practically I wouldn't say it's any better for now. My recommendation would be to close this PR and convert it into an issue in the SDK subsystem. I'd be ready to fill the details on the current and proposed approach. How does this sound? |
|
Ah, in addition, the current approach shows the header files in the IDE's project view, which is also a plus. (Not sure they'd show up without this.) So, even when we remove them from this, we'd need to add them as some separate item set just for that purpose. |
|
I hear you. But it still think that we try to scarify compatibility for our personal convenience. Whole C world compile just by sending only C files to compiler. So we should do so too. The C compilers speed up compilation by storing state somewhere else. We may try teach compiler to produce some output )l(list of .H files) after compilation process and then feed this to MSbuild somehow. I really don’t know how to solve this without sacrificing speed of compilation and have mental model of C compiler. |
|
Oh. Do you mean that we currently pass the They should be filtered at some moment inside of the SDK, just not excluded completely. |
There no need to have .h files as part of compilation,since only .c files produce something of value. .h included using preprocesor if needed.