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

Changed custom conditionals (bcc -ud) not recognized in "quick" compiles #93

Open
GWRon opened this issue Jul 29, 2019 · 2 comments
Open

Comments

@GWRon
Copy link
Contributor

GWRon commented Jul 29, 2019

When doing quick compilations unchanged files won't be recompiled.

Now each source file could contain/use conditionals. The basic conditionals (?Linux, ?debug ....) are part of the filenames BMK creates from the sources (these .i, .a. ,... files) so if one of these basic conditional changes the lookup for a pregenerated file uses them and a change leads to a different filename and so a required compilation.

The problem is then, that a custom conditional is not part of the filename (for now?) and this leads to "quick" compiles not picking up any change to these conditionals.

If this is a rarely used option then we could just append the custom conditionals to the filename. Done.
Problem here? What to do once it is enhanced to allow expressions (?WINDOWS_VERSION > 500) like described there: bmx-ng/bcc#464 ?

A "not the best but better than nothing" solution would be to just add "dynamicconditionals" (or similar) to the filenames if at least one was added via bmk->bcc -ud. All these files require a recompilation regardless of "quick" or not.
This will of course lead to a cascade of recompilations if it happens in one of the framework/core files of a project.

To avoid that, bcc could check conditional expressions: if it finds something comparing (= > <) or "joining" (?customConditionalA or customConditionalB) then it is a dynamic expression and should append "dynamicconditionals" to the filename, if the whole file does not contain a comparison (so simple "true/false") then it could just append the conditional to the filename.

Means having a conditional "freeaudio" and a "fmod" conditional the resulting files could be
myfile.linux.release.x86.freeaudio.a
myfile.linux.release.x86.fmod.a
or dynamic
myfile.linux.release.x86.dynamicconditionals.a

bmk would need to add file checks too and I am not sure about the way to detect outdated dynamicconditional-files (eg you remove the dynamic conditional from the source - it does not delete the generated precompilates). Would at least require an additional run ("found a dynamicconditionals precompilate - need to check if this is still required or already unused").

So ... I am not sure if this is even possible with "quick" and "dynamic conditionals".

@woollybah
Copy link
Member

There won't be any additional texts being added to generated filenames.
If anything, there may be a new file generated to keep track of them.... or something.

@GWRon
Copy link
Contributor Author

GWRon commented Jul 29, 2019 via email

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