Qualify diagnostic functions as pragma(printf)#11638
Conversation
|
Thanks for your pull request and interest in making D better, @nordlow! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. 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 run digger -- build "master + dmd#11638" |
|
This requires building with |
|
Maybe do something like this: diff --git a/src/build.d b/src/build.d
index 184b29313..76c6ec9f5 100755
--- a/src/build.d
+++ b/src/build.d
@@ -1007,6 +1007,11 @@ void processEnvironment()
else
env["HOST_DMD_KIND"] = "gdc";
+ // Determine version:
+ const verStart = hostDMDVersion.countUntil('v') + 1;
+ const versionNum = hostDMDVersion[verStart .. verStart + "X.XXX.X".length];
+ env["HOST_DMD_VERSION"] = versionNum;
+
env["DMD_PATH"] = env["G"].buildPath("dmd").exeName;
env.getDefault("DETAB", "detab");
env.getDefault("TOLF", "tolf");
@@ -1023,6 +1028,10 @@ void processEnvironment()
if (env["HOST_DMD_KIND"] != "gdc")
dflags ~= ["-dip25"]; // gdmd doesn't support -dip25
+ // Ignore
+ if (versionNum < "2.092.0")
+ dflags ~= "-ignore";
+
// TODO: add support for dObjc
auto dObjc = false;
version(OSX) version(X86_64)EDIT: For dmd as host compiler, others don't work as well. See #11639 for an alternative solution. |
Thanks. I'll try your patch. |
3480fe4 to
028681c
Compare
|
Does the error mean that |
|
Found that Guess we would have to implement another workaround for older host compilers or wait until they become recent enough... |
|
Doing There's much error checking to gain here so lets see what people think about this brute-force version-branching. Is this the dmd version where Update: We could create wrapper functions that have different versions depending on |
8097edc to
3390539
Compare
Think so.
Seems reasonable. |
|
@MoonlightSentinel: What do you make of the error https://auto-tester.puremagic.com/show-run.ghtml?projectid=1&runid=4161908&isPull=true? I'm clueless. |
|
Running locally using Win64 passes the test, so it looks like a parameter corruption. |
|
So I have to duplicate the creation of the |
3390539 to
ea93b5c
Compare
|
Ready to go, @MoonlightSentinel? |
The call in extern (C++) void error(const Loc loc, const(char)* format, ...)or, perhaps, even better, remove the |
|
Rewrite it to store a local -error(Loc(filename.xarraydup.ptr, lineNum, 0), "Use `NAME=value` syntax, not `%s`", pn);
+Loc(filename.xarraydup.ptr, lineNum, 0)
+error(loc, "Use `NAME=value` syntax, not `%s`", pn); |
Using You mean do the transition from |
|
Yes, let's stick with the current default ( |
ea93b5c to
8378abd
Compare
Done. |
|
Why does druntime fail to build in buildkite/dmd? I can't see any error message. Only a warning: |
|
Seems like a spurious OOM, restarted the job manually. |
Is dmd taking too much memory? |
The OOM occurred in the |
Is there no guarantee for the minimum amount of memory available? |
Nope, we run the agents ourselves and to save resources we run multiple agents on one machine (and they share the memory). It usually works out well though ;-) |
|
What's up with this failure? |
8378abd to
5b10609
Compare
No idea but it looks environmental ( |
Ok, thanks. Shall I do a forced push again? |
|
No, I've restarted it manually |
Thanks. |
Can you restart parts of the autotester or only the whole? I presume I don't have the permissions to restart individual jobs manually, right? |
Individual jobs (causing less workload than force-pushing)
See below |
Actually, anyone whose PRs can get tested on the auto-tester can also login there and deprecate the builds. Not that it would be important as the builds are constantly restarted. Once "auto-merge" is applied the PR branch will get higher priority and restart the build until it is green. |
| { | ||
| _vdeprecationSupplemental(loc, format, ap); | ||
| } | ||
| extern (C++) void _vdeprecationSupplemental(const ref Loc loc, const(char)* format, va_list ap) |
There was a problem hiding this comment.
Should have been private and extern(D)
Will improve type-checking of parameters used in C-
printf-style diagnostics formatting.