google / flatbuffers

FlatBuffers: Memory Efficient Serialization Library
https://flatbuffers.dev/
Apache License 2.0
23.29k stars 3.25k forks source link

STLPort support removal + bump of minimum supported compilers? #6704

Closed aardappel closed 2 years ago

aardappel commented 3 years ago

We have long had support for STLPort since we had one important internal user that needed it in combination with the Android SDK, that used to support it. They just dropped support, so we're allowed to drop it as well!

The STLPort support is one of the oldest, cruftiest parts of our "old C++" support, and removing it will go a long way towards cleaning things up, and paving the way towards easier modern C++ support.

First, if you are an external STLPort user, please speak up in this issue. It likely won't stop us from removing STLPort (likely you'd have to stay pinned to 2.0.0), but we'd like to know anyway. My guess there's no-one, but I could be surprised.

Second, there's the question of who is going to do the honors of removing it.. @vglavnyy ? @CasperN ? @dbaileychess ? If no-one volunteers, I will do it.

What will be removed? Besides anything related to FLATBUFFERS_CPP98_STL and a lot of what is in stl_emulation.h (in particular the flatbuffers:: versions of some containers), there's also our Android CI that needs to be set to a more modern stdlib. stl_emulation.h needs to be done with a little care since there's stuff in there that is used for emulation of features of more recent C++ versions also.

Once STLPort is gone, our newest low minimum in terms of compiler support is VS2010 or equivalent "C++0x". Until now, it didn't make a whole lot of sense to discuss upgrading that minimum, especially since the damage done by adhering to VS2010 was a lot smaller than STLPort. But it is has been 7.5 years since this minimum bar was set, and all compilers have made great progress since, so I feel maybe the time has come considering bumping this as well. I don't want to make this whole issue about "which minimum version of C++/VS/gcc/clang shall we bump to", but since the removal of STLPort may make it easy to remove some other crufty C++ stuff at the same time, it is worth mentioning.

So similarly, if you rely on VS2010 or a similar level of gcc (4.x?) or clang support, do speak up. I expect if we do bump up the minimum spec, we'll get some embedded programmers complaining. Though since we just released a relatively mature 2.0.0, I think asking a tiny part of our users to pin to that is worth it in the name of progress?

aardappel commented 2 years ago

It's in progress here: https://github.com/google/flatbuffers/pull/6918

aardappel commented 2 years ago

Landed :)