-
-
Couldn't load subscription status.
- Fork 655
needed compiler features to convert backend to D #8112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#8112" |
These CIs don't have 2.074:
Consensus from https://forum.dlang.org/post/zbxaviowooiaenaawmgs@forum.dlang.org summarized by @MartinNowak
(SemaphoreCi is now Travis-CI)
I thought that we agreed that just dropping |
|
That comment is nearly a year old. How long do we need to wait? The needed features I mentioned are easy to implement. |
I guess it has been discussed before, but could you explain why these are needed (or give a link)? Your changes to divcoeff.d work fine for me without these. |
|
Why is |
Both of these features are trivial to implement. I've been asking for them for years now in gdc/ldc.
In the last PR, the |
But how do does that relate to dmd? There's no sharing of compiled objects between projects right? From what I understand from your occasional PRs is that the backend is forked between them and occasionally synchronised.
The expensive part of D asserts are class/invariant checks, of which classes themselves are notably missing in the majority of the backend. I'm still not seeing past that the backend is separate between projects and so doesn't have to be identically built.
How come though? You are linking against druntime, so there won't be any missing symbols for dmd build. |
That was because DAutoTest/Digger is still using 2.067 and only 2.068 and higher doesn't generate a new assert template for every (see also: CyberShadow/ae#35) |
The backend is shared with dmc++. Diverging them will create a lot of makework for me. Furthermore, the dmc++ test suite has extensive tests for the backend that are not in the dmd test suite. The -mv switch is for anyone who needs to share code between projects despite a different directory structure. Telling them all to diverge their projects is a bad idea. The thing is, -mv is TRIVIAL to implement. Just copy the code over - I already did the hard part. Time spent arguing about it has already greatly exceeded the implementation effort. It has been a part of DMD for years. |
|
LDC already supports |
|
Failing with: |
Since this change will introduce another step to the from-source bootstrap process, why not use the newest version possible, to minimize the |
That's because comments in Make use BTW we could do the following "trick" to use a newer host compiler on the auto-tester: diff --git a/posix.mak b/posix.mak
index 9a4b24d17..aad671696 100644
--- a/posix.mak
+++ b/posix.mak
@@ -8,7 +8,7 @@ all:
$(QUIET)$(MAKE) -C src -f posix.mak all
auto-tester-build: toolchain-info
- $(QUIET)$(MAKE) -C src -f posix.mak auto-tester-build ENABLE_RELEASE=1
+ $(QUIET)$(MAKE) -C src -f posix.mak auto-tester-build ENABLE_RELEASE=1 AUTO_BOOTSTRAP=1
auto-tester-test: test(I just tested this with your patch and it works) This leaves the question to:
(it's two clicks for me to disable the GDC build on SemaphoreCI) One could argue
|
How embarrassing :-) |
|
However gdc doesn't have the same pitfalls as dmd (there have never been any assert "helper" templates) so you can use it to build without -betterC enabled.
You've already switched to Semaphore, which at least has 16.04 running (two years newer than Travis). Have you not considered seeing what the latest version is available there to see what features are enabled? It should be gdc-6 if I have the release schedule right. And 18.04 is right around the corner and will have gdc-8 bundled in, which is straight from master branch at the time of feature freeze. |
Anyhow the install script fetches the binaries from https://gdcproject.org/downloads (or http://gdcproject.org/downloads/LATEST in particular). That one still points to 4.8.5. (see also: https://github.com/dlang/installer/blob/master/script/install.sh#L540 and dlang/installer#251) |
|
I've never actually bothered updating the frontend version because it's not strictly true to do so. If I were to give it a version, GDC master would be 2068+really2076-withoutstaticforeach-andothermissingbackportsthatarentneededforpassingtestsuite-c++. So to call it 2076 would be a stretch of the imagination, but its certainly far closer to 2076 than 2068, despite the frontend still implemented in C++. :-) |
I understand the need for that bootstrap. But I think it's time to make it two stage instead of one stage. First, boot to 2.079. Then use 2.079 to boot to the latest. @CyberShadow can you make this happen? |
Of course, no problem. This is why I suggested that we use the latest version as of now (2.079), to minimize the number of steps. I updated Digger and DAutoTest to use 2.079.0 if |
Ping @braddr - could you please update the build machines to 2.079.0 too then?
Okay so from what I gather is that there's no easy way to grab a recent GDC binary that runs on SemaphoreCI (correct @ibuclaw ?), so I guess I will try compiling GDC from master, s.t. we have a binary that SemaphoreCI can run. |
|
While I don't have a stake in this discussion myself (LDC supports the "worse D" switch because users expect it, even though I still think it's a fundamentally flawed design), there is one point I'd like to raise: Is it really true that converting the backend to D "requires" these features? As in, is this a statement that could be defended in good faith in a discussion among competent engineers?
I don't see a reason for And TL;DR: Some of these features might be nice to have, but there is no reason they should block any work on the compiler backend. |
I agree. These features are not a technical requirement. |
|
If I read the auto-tester logs correctly, @braddr has silently been preparing a first may present for us, i.e. almost some hosts have been updated to 2.079.0: which means only the OSX hosts need to be updated :) |
|
CC @schveiguy for upgrading the auto-tester OSX hosts. |
|
So any updates on upgrading the OSX hosts at auto-tester to 2.079? |
Currently blocked on OSX by #8243 |
|
@braddr can we try again to upgrade OSX boxes to 2.079? |
9e64918 to
cf107e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title and description are a bit misleading now.
This just restores the asserts that were already there before the conversion to D. Would be good to reflect that in the commit message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see that finally all boxes have been upgraded :)
FWIW we still use "latest" GDC (currently 4.8.5 - based on 2.068.2) to compile DMD on Semaphore to check for being able to compile dmd with gdc.
So it would be great to update that one too, s.t. we can take advantage of all the great features (and frontend fixes) that have been committed since.
While it's on my TODO list to compile GDC for Ubuntu 14.04 (Trusty), I sadly won't get to this this month. I think the latest Ubuntu does ship with the latest/greatest GDC, but IIRC only GCC 4.9 is still supported whereas Trusty only supports GCC 4.8.
So if anyone wants to see this happen, all that's needed is a tar ball similar to the ones from gdcproject.org
|
Are we waiting on something here? I think this should be merged. |
Features needed:
-mvcompiler switch-betterCswitchassertfailures to C's assert failure functiondmd 2.074 does these.
This is the canary for those features. They're needed to convert the dmd backend to D.