On Saturday, 2 June 2018 at 16:27:38 UTC, Seb wrote:
On Saturday, 2 June 2018 at 16:04:09 UTC, Matthias Klumpp wrote:
On Saturday, 2 June 2018 at 03:15:56 UTC, crimaniak wrote:
I started to work with Travis-CI, building packages using all
three main compilers, and noticed that I have problems with
gdc every time and need to tweak code because of many things
missing. For example:
https://travis-ci.org/crimaniak/json-patch/jobs/386963340
Why this situation with gdc and how best to deal with it?
The build log seems to indicate it uses gdc 4.8, while the
current version of GDC is 8.1 which is based on the 2.076
frontend.
Maybe just updating GDC on Travis will fix this.
Sadly that's not so easy as
1) the GDC download path changed and we are still waiting on
feedback from Ian on this (since more than, see
https://github.com/dlang/installer/pull/251)
2) AFAICT there are no public binaries that use anything later
than 2.068.2 could be used (see
https://gdcproject.org/downloads)
That's unfortunate. I hope Iain comments on this soon, because it
means GDC will receive much less testing by other projects. For
getting up-to-date binaries, in theory those could be extracted
from GDC's Debian packages, which are usually very up-to-date
(even Git snapshots are occasionally packaged) - problem there is
that I am not sure whether they will work standalone and with the
older GLibc on Travis.
@crimaniak: If you really want to build with all compilers, there
is a workaround for this issue that does not involve you
supporting ancient D versions, and that is to actually use
Debian's GDC on Travis. I use this excessively for my own
projects, mostly though because I need newer system libraries and
because I explicitly want to build with the packaged compilers as
well.
You can use a similar approach and limit it to GDC only, I
created a PR for that:
https://github.com/crimaniak/json-patch/pull/1
As you can see on
https://travis-ci.org/crimaniak/json-patch/jobs/387197216 , your
code builds fine with the latest GDC.
So, if you want that workaround, please take it, if not it may
serve as a reference for others facing the same problem.