zerodaycode / Zork

Project manager and builder automation tool for modern C++ projects
MIT License
149 stars 10 forks source link

Cached commands aren't modified if the flyweight data changes #130

Closed TheRustifyer closed 2 months ago

TheRustifyer commented 2 months ago

Bug Report

Description

Cached commands aren't modified if the flyweight data changes. If the user changes a property that we track on the flyweight datastructures after building n user declared files, those aren't rebuilt with the new flags.

Most compilers expects that the args passed to build the translation units being consistent and coherent, if some files aren't picking the new flags, the compiler must refuse to build them (depending what args).

But even worse is that the unique solution actually is to rebuilt from scratch the project

Expected result

Translation units are rebuilt with the new flags

Actual result

Translation units aren't rebuilt with the new arguments

Possible solution

Use the cache metadata flag that tracks those changes on cached project models to force the commands generator to rebuild the translation units even if they weren't modified