Skip to content

Conversation

@kant2002
Copy link
Collaborator

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.

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.
@ForNeVeR ForNeVeR self-requested a review November 21, 2024 12:23
@ForNeVeR ForNeVeR self-assigned this Nov 21, 2024
@ForNeVeR
Copy link
Owner

ForNeVeR commented Dec 8, 2024

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 .h file won't lead to project recompilation.

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 .tlog-related logic in MSBuild, and I'd prefer to avoid this for the time being).

Why do you want to remove these? Are they causing any specific problems?

@ForNeVeR
Copy link
Owner

@kant2002 do you still think we need this?

@ForNeVeR ForNeVeR removed their assignment Nov 16, 2025
@kant2002
Copy link
Collaborator Author

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.

@ForNeVeR
Copy link
Owner

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?

@ForNeVeR
Copy link
Owner

ForNeVeR commented Nov 16, 2025

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.

@kant2002
Copy link
Collaborator Author

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.

@ForNeVeR
Copy link
Owner

Oh. Do you mean that we currently pass the .h files to the compiler as is? This is not expected indeed :)

They should be filtered at some moment inside of the SDK, just not excluded completely.

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 this pull request may close these issues.

3 participants