Matthew Gidden wrote:
> how the developer work flow should work when developers
> use different compilers.
Compiler diversity can be a great benefit, because it gives you multiple
automated opinions as to whether your code is good or bad. This
especially holds true if you have any kind of automated testing suite.
Run that suite under every compiler you care about, on every platform
you care about. Do it as often as you can: ideally after each every
commit. If every platform likes your code, then your code *might* be
correct. If any platform fails tests, then apparently your code was
broken and the other systems were just letting you get lucky.
Next step up from that is to have build-and-test virtual machines, again
representing every compiler and platform you care about. At each commit
these machines pull from the repository, build, and test. Also make
these machine images available to the developers directly, so any
developer can easily test out their code in any environment you care
about. I suppose there's some clever way to manage all this using git,
but git and I are still just casual acquaintances, so I'll leave that
for others to comment on.
See also <
https://nmi.cs.wisc.edu/> for a UW-Madison campus resource
that can give you access to a wide variety of different platforms,
specifically oriented toward automated building and testing. If you can
run on everything in the BaTLab, then you've written some fairly
cross-platform code.
I used to work for a company whose software ran under MacOS, Windows,
and roughly 25 different Unix variants. (Yes, there really used to be
that many Unixen.) Once you get your code compiling cleanly under two
dozen different compilers, then you can really say something about not
having any lurking undefined behaviors. I particularly remember that
our Data General box, running DG/UX, would emit compiler warnings about
things that nothing else complained about, and every one of those
warnings revealed a real problem that we were glad to find and fix. The
compiler was slow as molasses, but when it spoke to us ... we listened
closely.
In my experience what worked well was to have (1) diversity among
primary machines used by developers; (2) easy developer access to other
kinds of machines for testing; and (3) strong social enforcement that
says that we are a cross-platform shop, so if your code fails on any
supported platform, then your code is wrong, and "worked on my machine"
is not a legitimate excuse.
I guess I'm not really answering your question here, regarding developer
work flow. But perhaps this is a useful perspective anyway, to help you
see that platform heterogeneity can be a benefit, not just a hassle.
Good luck! In the words of my former employer's VP of engineering ...
"There is no such thing as portable code. There is merely code that has
been ported."
-- Ben