> On March 14, 2018, 9:47 a.m., Benjamin Bannier wrote:
> > Hmm, I am not sure I am super thrilled about this patch. How about not 
> > using unsupported compilers instead? And like you said, the warning is just 
> > annoying but harmless.

We're not using an unsupported compiler. We're using the latest stable MSVC 
compiler, which they (the MSVC team) test against Boost (and Mesos) before they 
update.

It's fine that Boost wants to say, "hey, you're compiler is a bit new, we're 
not 100% certain it'll work." But it's not fine to say it in an undisableable 
warning that's thrown from included headers and so repeated hundreds of times 
in a build of an upstream project.

It is true that maybe they'll push a patch version in which we hit a bug, but 
_this_ warning is not what's going to help us find it.

The problem here is that Boost hard-coded a "maximum" compiler version, down to 
the patch number, into their headers. It'd be like if they supported GCC 7.0, 
but threw a warning if you started using 7.0.1 instead. That's what this bit of 
code does. Throwing a warning for say 8.0 would be reasonable; but still not in 
the way they do it here, where it can't be turned off and gets repeated by 
every single source file in your code base.


- Andrew


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66046/#review199182
-----------------------------------------------------------


On March 13, 2018, 3:30 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66046/
> -----------------------------------------------------------
> 
> (Updated March 13, 2018, 3:30 p.m.)
> 
> 
> Review request for mesos, Akash Gupta, Benjamin Bannier, Jeff Coffler, John 
> Kordich, Joseph Wu, and Michael Park.
> 
> 
> Bugs: MESOS-8556
>     https://issues.apache.org/jira/browse/MESOS-8556
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> On Windows, Boost explicitly checks if it's being compiled with a
> compiler version they've tested. As we tend to update Visual Studio
> whenever a stable update is available, this leads to a Boost warning,
> "Unknown compiler version..." being emitted repeatedly (for every file
> which includes a Boost header).
> 
> If it were emitted once, we would leave it be, but because it's
> repeated hundreds of times, and is mostly harmless, we patch the build
> to remove the warning itself. Unfortunately, there is no compile-time
> option to disable the warning instead of a patch.
> 
> Note that it is not straight-forward to generate a patch file for
> Boost. The steps were: clone the Boost repo recursively, go the
> `libs/config` submodule, edit the `visualc.hpp` file, go to the
> `include` subdirectory, and use `git diff --relative` to generate the
> patch with the corrects paths expected for the extracted tarball.
> 
> 
> Diffs
> -----
> 
>   3rdparty/CMakeLists.txt 61dc788edf96ca6e8e3ee736eb232c0c118e6191 
>   3rdparty/boost-1.65.0.patch PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/66046/diff/1/
> 
> 
> Testing
> -------
> 
> Built on Windows; no more warning.
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>

Reply via email to