build-cpp / cmkr

Modern build system based on CMake and TOML.
https://cmkr.build
MIT License
431 stars 27 forks source link

Upgrade cmkr to C++17/20 ? #30

Closed Guekka closed 2 years ago

Guekka commented 2 years ago

Hey. I've stumbled upon this repo and find the concept very interesting. I may give it a try on some of my projects

But I'm wondering, why use C++11? Some parts of the code could be made more modern using a more recent version of C++. Is there any reason to keep an old version?

mrexodia commented 2 years ago

Hello,

Thanks for your interest! Using C++11 is indeed on purpose and I wrote my design considerations in more detail at https://github.com/build-cpp/cmkr/pull/2.

The gist of it is that C++11 is pretty much universally supported now (even on older distros, weird in-house systems etc.) so using C++11 means that the bootstrapping process can always complete. Perhaps in ~5 years the major version can be bumped when C++14 becomes universally supported.

I think it would be helpful to write down design considerations like this in a page of the documentation, so I’ll try to get to that whenever I have time :)

Guekka commented 2 years ago

I understand your point, but cmkr is a binary, not a library. And as far as I know, CMake only supports Windows, Mac and Linux. So distributing Windows, Mac and Linux binaries should be enough to achieve compatibility with every system.

Anyway, it's your choice, I can understand it. Thanks for the quick answer. As for:

I think it would be helpful to write down design considerations like this in a page of the documentation

I think linking that issue in the readme would be good enough for now

mrexodia commented 2 years ago

True, the releases on GitHub are already shipping independent binaries, but running untrusted binaries downloaded from the internet is not always an option.

In the default mode cmkr ships a bootstrapping module that automatically downloads the exact version of cmkr and compiles it during your configuration process (optionally from your own git servers). This means you can audit and fully trust the whole pipeline vs having to trust a “random” binary from the internet.

Personally I would also prefer a more modern C++, but when setting that as a requirement you are excluding a large chunk of the potential userbase just to save a few lines of code. To me there is no substantial upside, while the potential downside is huge.

On Tue, 9 Nov 2021 at 13:27, Guekka @.***> wrote:

I understand your point, but cmkr is a binary, not a library. And as far as I know, CMake only supports Windows, Mac and Linux. So distributing Windows, Mac and Linux binaries should be enough to achieve compatibility with every system.

Anyway, it's your choice, I can understand it. Thanks for the quick answer. As for:

I think it would be helpful to write down design considerations like this in a page of the documentation

I think linking that issue in the readme would be good enough for now

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/build-cpp/cmkr/issues/30#issuecomment-964106464, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASYFGOCVARQB2WS2X6DORDULEHUBANCNFSM5HUVM3QQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Guekka commented 2 years ago

I did not consider security. I still think there are alternatives for someone wanting a trusted binary (build on a trusted recent system, share the binary). But I understand better, thanks for explaining.