seanbaxter / circle

The compiler is available for download. Get it!
http://www.circle-lang.org/
2.42k stars 74 forks source link

Per-file features doesn't seem compatible with unity/blob builds #172

Closed gab closed 1 year ago

gab commented 1 year ago

For large projects, it's extremely common to compile using so-called unity or blob builds. Multiple .CPP files are compiled into one. Build systems like Fasbuild or engines like Unreal are typically able to automate this for you. This have the side-effect of leaking #include statements into other .CPP files within the same blob, and makes using namespaces more awkward - but otherwise, it works, and the speed benefits are very important.

It seems to me that a project using unity builds would be unable to use your file-based versioning since the versioning would leak into other.cpp files. I think you might want to introduce scope-based versioning, or versioning closing tags, for compatibility.

gab commented 1 year ago

Ok I saw in your talk that you have a #pragma feature off to close where a feature is used. Didn't see a mention of those in the documentation though.