-
-
Notifications
You must be signed in to change notification settings - Fork 672
fix Issue 18905 - [Reg 2.079] C++ classes can no longer be used with … #8304
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 references
|
|
The code between the new |
| @@ -0,0 +1,3 @@ | |||
| // https://issues.dlang.org/show_bug.cgi?id=18905 | |||
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.
Don't you need -betterC compiler flags here? Also, you might want to add this to the existing betterc.d test file.
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.
Yes, good catch!
| return; | ||
| } | ||
|
|
||
| const bool gentypeinfo = global.params.useTypeInfo && Type.dtypeinfo; |
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.
If you merge dlang/druntime#2184, then you'll only need to check Type.dtypeinfo because the runtime will no longer import the TypeInfo classes when compiling with -betterC. There are other places in the DMD source code that can be simplified due to that PR.
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.
I'm not so sure about that. 2184 seems to be more concerned with the nothrow issue, which is unrelated to this PR's fix. It isn't ready yet, either, and this PR fix works and is pretty simple.
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.
2184 is actually more concerned with preventing the import of code which is not relevant to a -betterC build. The nothrow addition was added because -betterC code should be nothrow at all times. If you want me to separate the two into different PRs, I can. Just let me know. And, it is all green and ready to go.
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.
I'm not too happy about the nothrow business, as I mentioned. But we should discuss that elsewhere, not here. I also do not believe that 2184 will resolve this issue, as note it took two different tests to get it through the test suite, not just checking typeinfo.
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.
Understood. Please see dlang/druntime#2194. It prevents unnecessary imports in -betterC, and removes the nothrow issue.
|
I know about the no whitespace view, but I wanted to yank all that code out into a separate function anyway, and that view won't help with that. If I yank it out now, then nobody will want to review this because it's multiple screens of diffs. |
|
@CyberShadow the following error appears in the CyberShadow/DAutoTest: but scanning the voluminous log, I can't see what the actual error is. Please advise! |
|
It looks like a problem with Dub. It seems to have exited with a non-zero exit code without printing an error message. Try rebasing and force-pushing to force a rebuild. |
Already tried it. Same result. |
|
It still looks like an intermittent failure. See http://dtest.dlang.io/history/master - a build of the master branch recently failed with a similar problem, but got fixed by itself. |
|
Also the last stable branch build is failing with the same issue: |
|
It looks like |
MartinNowak
left a comment
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.
Should have targeted stable.
| } | ||
| } | ||
| flags |= ClassFlags.noPointers; | ||
| L2: |
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.
Please avoid seemingly unrelated refactorings in bugfixes or mention why they were necessary.

…-betterC