Skip to content

Commit d39df83

Browse files
committed
Merge remote-tracking branch 'upstream/master' into stable
2 parents ae0491e + 4c5af34 commit d39df83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1655
-574
lines changed

.htaccess

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,5 +233,8 @@ Redirect 301 /dips/1038 https://github.com/dlang/DIPs/blob/master/DIPs/accepted/
233233
Redirect 301 /dips/1039 https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1039.md
234234
Redirect 301 /dips/1040 https://github.com/dlang/DIPs/blob/master/DIPs/DIP1040.md
235235
Redirect 301 /dips/1041 https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1041.md
236-
Redirect 301 /dips/1042 https://github.com/dlang/DIPs/blob/master/DIPs/DIP1042.md
237-
Redirect 301 /dips/1043 https://github.com/dlang/DIPs/blob/master/DIPs/DIP1043.md
236+
Redirect 301 /dips/1042 https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1042.md
237+
Redirect 301 /dips/1043 https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1043.md
238+
Redirect 301 /dips/1044 https://github.com/dlang/DIPs/blob/master/DIPs/rejected/DIP1044.md
239+
Redirect 301 /dips/1045 https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1045.md
240+
Redirect 301 /dips/1046 https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1046.md

areas-of-d-usage.dd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ $(AREA_SECTION3 $(LNAME2 games, Games), $(ARTICLE_FA_ICON gamepad),
9191

9292
Many pure-D open source projects show the rising popularity
9393
of D among game developers.
94-
Examples are the cross-platform 3D game engine
95-
$(HTTP dash.circularstudios.com, Dash) and the D game development toolkit
96-
$(HTTPS github.com/d-gamedev-team/gfm, gfm).
94+
Examples are the 3D game engine
95+
$(HTTP https://github.com/gecko0307/dagon, Dagon) and the cross-platform D game development engine
96+
$(HTTPS https://github.com/MrcSnm/HipremeEngine, HipremeEngine).
9797
)
9898

9999
$(AREA_SECTION3 $(LNAME2 web, Web applications), $(ARTICLE_FA_ICON cloud),

articles/faq.dd

Lines changed: 53 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ $(D_S $(TITLE),
55
$(P The same questions keep cropping up, so the obvious thing to do is
66
prepare a FAQ.)
77

8-
$(P $(LINK2 http://www.digitalmars.com/d/1.0/faq.html, D 1.0 FAQ))
9-
$(P $(LINK2 http://www.digitalmars.com/faq.html, C++ FAQ))
8+
$(P See also:)
9+
10+
* $(DDLINK articles/const-faq, const(FAQ), const(FAQ)) for `const` and `immutable`.
11+
* $(LINK2 http://www.prowiki.org/wiki4d/wiki.cgi?FaqRoadmap, The D wiki FAQ page)
12+
* $(LINK2 http://www.digitalmars.com/d/1.0/faq.html, D 1.0 FAQ)
13+
* $(LINK2 http://www.digitalmars.com/faq.html, C++ FAQ)
1014

1115
$(H2 D 2.0 FAQ)
1216

@@ -17,16 +21,6 @@ $(H2 D 2.0 FAQ)
1721

1822
$(LI I suggested a great feature. Why was the suggestion ignored?)
1923

20-
$(LI Why const and immutable?)
21-
22-
$(LI Why the $(I names) const and immutable?)
23-
24-
$(LI How exactly is immutable related to multicores?)
25-
26-
$(LI Ok, I'm fine with immutable for safe data sharing among threads. But why do we need the uninformative const?)
27-
28-
$(LI Why are immutable strings favored in D 2.0?)
29-
3024
$(LI I want to contribute to D 2.0. How can I effect that?)
3125

3226
$(ITEMR case_range, Why doesn't the case range statement
@@ -48,9 +42,6 @@ $(H2 D 2.0 FAQ)
4842
$(H2 General D FAQ)
4943

5044
$(UL
51-
52-
$(LI $(LINK2 http://www.prowiki.org/wiki4d/wiki.cgi?FaqRoadmap, The D wiki FAQ page)
53-
with many more questions answered)
5445
$(LI $(LINK2 $(ROOT_DIR)comparison.html, What does D have that C++ doesn't?))
5546
$(ITEMR q1, Why the name D?)
5647
$(ITEMR q1_1, Could you change the name? D is kind of hard to search for on search engines.)
@@ -226,7 +217,7 @@ $(ITEM q4, Why is printf in D?)
226217
is not part of D, it is part of C's standard
227218
runtime library which is accessible from D.
228219
D's standard runtime library has
229-
$(REF writefln, std,stdio)
220+
$(REF writef, std,stdio)
230221
which is as powerful as $(LINK2 http://www.digitalmars.com/rtl/stdio.html#printf, printf)
231222
but is much easier to use.
232223
)
@@ -365,6 +356,7 @@ $(ITEM real, What is the point of 80 bit reals?)
365356

366357
$(ITEM anonymous, How do I do anonymous struct/unions in D?)
367358

359+
$(RUNNABLE_EXAMPLE
368360
-----------------------
369361
import std.stdio;
370362

@@ -385,46 +377,74 @@ void main()
385377
Foo.d.offsetof);
386378
}
387379
-----------------------
380+
)
388381

389382
$(ITEM printf, How do I get printf() to work with strings?)
390383

391-
In C, the normal way to printf a string is to use the $(B %s)
392-
format:
384+
$(P In C, the normal way to printf a string is to use the $(D %s)
385+
format:)
393386

394387
$(CCODE
395388
char s[8];
396389
strcpy(s, "foo");
397390
printf("string = '%s'\n", s);
398391
)
399392

400-
Attempting this in D, as in:
393+
$(P Attempting this in D:)
401394

395+
$(RUNNABLE_EXAMPLE_FAIL
402396
---------------------------------
397+
import core.stdc.stdio;
403398
string s;
404399
s = "foo";
405-
printf("string = '%s'\n", s);
400+
printf("string = '%s'\n", s); // Error
406401
---------------------------------
407-
408-
usually results in garbage being printed, or an access violation.
409-
The cause is that in C, strings are terminated by a 0 character.
410-
The $(B %s) format prints until a 0 is encountered.
411-
In D, strings are not 0 terminated, the size is determined
402+
)
403+
$(P The call gets flagged at compile-time (see
404+
$(DDSUBLINK spec/pragma, printf, `pragma(printf)`))
405+
because in general, `string` is not compatible with the `%s` specifier.
406+
This prevents garbage being printed, or an access violation.)
407+
408+
$(P In D, a string is an array, so it has a length and a pointer.
409+
In C, a string is a pointer to memory terminated by a 0 character.
410+
The $(D %s) format prints until a 0 is encountered.
411+
In D, strings in general are not 0-terminated, the size is determined
412412
by a separate length value. So, strings are printf'd using the
413-
$(B %.*s) format:
413+
$(D %.*s) format:)
414414

415+
$(RUNNABLE_EXAMPLE
415416
---------------------------------
417+
import core.stdc.stdio;
416418
string s;
417419
s = "foo";
418-
printf("string = '%.*s'\n", s);
420+
printf("string = '%.*s'\n", cast(int) s.length, s.ptr);
419421
---------------------------------
422+
)
423+
$(P which will behave as expected, for that input data.
424+
There are pitfalls:)
425+
* printf's $(D %.*s) will print until the length
426+
is reached or a 0 is encountered, so D strings with embedded 0's
427+
will only print up to the first 0.
428+
* printf's length argument is an int, so ensure `s.length <= int.max`.
429+
430+
$(P D string literals are actually 0-terminated, so `%s` can be used
431+
with the `.ptr` property and printf will work for those.
432+
However, non-literal strings often are not 0-terminated:)
433+
434+
$(RUNNABLE_EXAMPLE
435+
---
436+
import core.stdc.stdio;
437+
printf("string = '%s'\n", "bar".ptr); // OK, 0-terminated
438+
439+
string s = "food";
440+
s = s[0..3]; // foo, not 0-terminated
441+
printf("string = '%.*s'\n", cast(int) s.length, s.ptr);
420442

421-
$(P which will behave as expected.
422-
Remember, though, that printf's $(B %.*s) will print until the length
423-
is reached or a 0 is encountered, so D strings with embedded 0's
424-
will only print up to the first 0.
443+
s ~= "ie"; // s is still not 0-terminated
444+
---
425445
)
426446

427-
$(P Of course, the easier solution is just use $(REF writefln, std, stdio)
447+
$(P Of course, the easier solution is just to use $(REF writef, std, stdio)
428448
which works correctly with D strings.
429449
)
430450

@@ -791,7 +811,7 @@ $(ITEM gc_1, Isn't garbage collection slow and non-deterministic?)
791811
However, the use of GC instead of malloc enables advanced language
792812
constructs (especially, more powerful array syntax), which greatly
793813
reduce the number of memory allocations which need to be made.
794-
This can mean that GC is actually faster than explict management.
814+
This can mean that GC is actually faster than explicit management.
795815
)
796816

797817
$(ITEM pure, Can't a sufficiently smart compiler figure out that a function is pure automatically?)

book/dlang.org.ddoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ GLOSSARY = $(HTTP dlang.org/spec/glossary.html#$0, $0)
184184
GLOSSARY2 = $(HTTP dlang.org/spec/glossary.html#$1, $2)
185185
GNAME=<a id="$0">$(SPANC gname, $0)</a>
186186
GRAMMAR=$(TC pre, bnf notranslate, $0)
187-
GRAMMAR_INFORMATIVE=$(GRAMMAR $0)
187+
INFORMATIVE_GRAMMAR=$(GRAMMAR $0)
188188
GRAMMAR_LEX=$(GRAMMAR $0)
189189
GREEN=$(SPANC green, $0)
190190
GSELF=$(I $0)
@@ -403,7 +403,6 @@ $1
403403
RUNNABLE_EXAMPLE_STDIN=<code class="runnable-examples-stdin">$0</code>
404404
RUNNABLE_EXAMPLE_ARGS=<code class="runnable-examples-args">$0</code>
405405

406-
SAMPLESRC=$(SPANC sample_src, $(AHTTPS github.com/dlang/dmd/blob/master/compiler/samples/$0, /dmd/compiler/samples/$0))
407406
SCINI=$(TC pre, scini notranslate, $0)
408407
SCRIPTLOAD=<script type="text/javascript" src="$1"$+></script>
409408
SEARCHDEFAULT_PHOBOS=

bugstats.dd

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,35 @@
11
Ddoc
22

3-
$(D_S Bug tracker,
3+
$(D_S Issue tracker,
44

55
$(P
6-
We use $(B Bugzilla) to track the issues for the D programming language.
6+
We use $(B Github) to track the issues for the D programming language.
77
$(BR)
8-
The home of the D issue tracker is: $(B $(LINK https://issues.dlang.org))
8+
The home of the D issue tracker is: $(B $(LINK https://github.com/dlang/dmd/issues))
99
)
1010

1111
$(P
12-
You can browse through the existing bugs by project $(LINK2 https://issues.dlang.org/describecomponents.cgi?product=D, $(B here)).
12+
You can browse through the existing projects $(LINK2 https://github.com/dlang, $(B here)).
1313
)
1414

1515
$(P
16-
If you want to search for a specific bug, you can use the $(LINK2 https://issues.dlang.org/query.cgi?format=specific, $(B search page)).
17-
)
18-
19-
$(P
20-
And if you want to file a new bug, you can use $(LINK2 https://issues.dlang.org/enter_bug.cgi?product=D, $(B this page)),
16+
And if you want to file a new issue, you can use $(LINK2 https://github.com/dlang/dmd/issues/new, $(B this page)),
2117
but please $(HTTPS github.com/dlang/dmd/blob/master/CONTRIBUTING.md#reporting-bugs, check the guidelines) first.
2218
)
2319

24-
$(H3 Bug Tracker Statistics)
25-
26-
$(BOOKTABLE $(SECTION3 Current bugs <font size="-1">$(LINK2 https://issues.dlang.org/enter_bug.cgi?product=D,[report new bug])$(LINK2 https://issues.dlang.org/query.cgi,[search])</font>),
27-
$(DISPLAY Regression, y_axis_field=bug_severity&amp;query_format=report-table&amp;product=D&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_severity=regression)
28-
$(DISPLAY Blocker, y_axis_field=bug_severity&amp;query_format=report-table&amp;product=D&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_severity=blocker)
29-
$(DISPLAY Critical, y_axis_field=bug_severity&amp;query_format=report-table&amp;product=D&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_severity=critical)
30-
$(DISPLAY Major, y_axis_field=bug_severity&amp;query_format=report-table&amp;product=D&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_severity=major)
31-
$(DISPLAY Normal$(COMMA) minor$(COMMA) or trivial, y_axis_field=bug_severity&amp;query_format=report-table&amp;product=D&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_severity=normal&amp;bug_severity=minor&amp;bug_severity=trivial)
32-
$(DISPLAY Enhancement, y_axis_field=bug_severity&amp;query_format=report-table&amp;product=D&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_severity=enhancement)
33-
$(DISPLAY All open, y_axis_field=bug_severity&amp;query_format=report-table&amp;product=D&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_severity=normal&amp;bug_severity=minor&amp;bug_severity=trivial&amp;bug_severity=regression&amp;bug_severity=blocker&amp;bug_severity=critical&amp;bug_severity=major&amp;bug_severity=enhancement)
34-
$(DISPLAY All closed, y_axis_field=bug_severity&amp;query_format=report-table&amp;product=D&amp;bug_severity=normal&amp;bug_severity=minor&amp;bug_severity=trivial&amp;bug_severity=regression&amp;bug_severity=blocker&amp;bug_severity=critical&amp;bug_severity=major&amp;bug_severity=enhancement&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED)
20+
$(H3 GitHub Labels)
21+
$(P
22+
Issues & PRs are categorized using $(LINK2 https://github.com/dlang/dmd/labels, labels). Common labels include:
23+
$(UL
24+
$(LI $(B $(LINK2 https://github.com/dlang/dmd/labels/Severity%3AICE, Severity:ICE )) - Internal Compilation Error)
25+
$(LI $(B $(LINK2 https://github.com/dlang/dmd/labels/Severity%3AEnhancement, Severity:Enhancement)) - Enhancement requests)
26+
$(LI $(B $(LINK2 https://github.com/dlang/dmd/labels/Severity%3ABug%20Fix, Severity:Bug Fix)) - Bug related issues)
27+
$(LI $(B $(LINK2 https://github.com/dlang/dmd/labels/Druntime, Druntime)) - Specific to Druntime)
28+
$(LI $(B $(LINK2 https://github.com/dlang/dmd/labels/P1, P1)) - High Priority)
29+
$(LI $(B $(LINK2 https://github.com/dlang/dmd/labels/Review%3AWIP, Review:WIP)) - Work in Progress)
30+
)
3531
)
36-
37-
<!-- hidden iframe to graph HTML URL, to trigger generating the image linked to below -->
38-
<iframe width="1" height="1" frameBorder="0" src="$(GRAPH_HTML_URL)"></iframe>
39-
40-
$(P <center>$(LINK2 $(GRAPH_HTML_URL), <img border="1" src="$(GRAPH_IMG_URL)">)</center>)
41-
4232
)
4333

4434
Macros:
45-
TITLE=The D Bug Tracker
46-
BOOKTABLE = <center><table cellspacing="0" cellpadding="5" class="book"><caption>$1</caption>$2</table></center>
47-
DISPLAY=$(TR $(TD $(LINK2 https://issues.dlang.org/buglist.cgi?$2, $1)) $(TD <iframe scrolling="no" frameborder="0" width="4.8em" height="1.4em" style="width:4.8em;height:1.4em;" vspace="0" hspace="0" marginwidth="0" marginheight="0" src="fetch-issue-cnt.php?$2&amp;format=table&amp;action=wrap&amp;ctype=csv"></iframe>))
48-
GRAPH_HTML_URL=https://issues.dlang.org/reports.cgi?product=D&amp;datasets=NEW&amp;datasets=ASSIGNED&amp;datasets=REOPENED&amp;datasets=RESOLVED
49-
GRAPH_IMG_URL=https://issues.dlang.org/graphs/mVH75HpydPklNqy3BSv8EvqlAOaP1WacmgYB1CsRbiM.png
35+
TITLE=The D Issue Tracker

changelog/release-schedule.dd

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ $(UL
88
$(LI Point releases are published unscheduled when important issues or regressions get fixed.)
99
)
1010

11-
$(P The release schedule for 2024 is as follows:)
11+
$(P The release schedule for 2025 is as follows:)
1212

1313
$(DIVC release-schedule,
1414
$(TABLE
15-
$(BETA_RELEASE 2024-01-01, 2.107.0)
16-
$(MINOR_RELEASE 2024-02-01, 2.107.0)
17-
$(BETA_RELEASE 2024-03-01, 2.108.0)
18-
$(MINOR_RELEASE 2024-04-01, 2.108.0)
19-
$(BETA_RELEASE 2024-05-01, 2.109.0)
20-
$(MINOR_RELEASE 2024-06-01, 2.109.0)
21-
$(BETA_RELEASE 2024-07-01, 2.110.0)
22-
$(MINOR_RELEASE 2024-08-01, 2.110.0)
23-
$(BETA_RELEASE 2024-09-01, 2.111.0)
24-
$(MINOR_RELEASE 2024-10-01, 2.111.0)
25-
$(BETA_RELEASE 2024-11-01, 2.112.0)
26-
$(MINOR_RELEASE 2024-12-01, 2.112.0)
15+
$(BETA_RELEASE 2025-01-01, 2.110.0)
16+
$(MINOR_RELEASE 2025-02-01, 2.110.0)
17+
$(BETA_RELEASE 2025-03-01, 2.111.0)
18+
$(MINOR_RELEASE 2025-04-01, 2.111.0)
19+
$(BETA_RELEASE 2025-05-01, 2.112.0)
20+
$(MINOR_RELEASE 2025-06-01, 2.112.0)
21+
$(BETA_RELEASE 2025-07-01, 2.113.0)
22+
$(MINOR_RELEASE 2025-08-01, 2.113.0)
23+
$(BETA_RELEASE 2025-09-01, 2.114.0)
24+
$(MINOR_RELEASE 2025-10-01, 2.114.0)
25+
$(BETA_RELEASE 2025-11-01, 2.115.0)
26+
$(MINOR_RELEASE 2025-12-01, 2.115.0)
2727
)
2828
)
2929
)

d-keyring.gpg

2.25 KB
Binary file not shown.

d-keyring.gpg.sig

0 Bytes
Binary file not shown.

ddoc/dub.sdl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name "ddoc_preprocessor"
22
description "Preprocesses source code before running Ddoc over it"
33
dependency "libdparse" version="~>0.15.1"
4-
dependency "dmd" path="../../dmd"
5-
versions "DdocOptions"
4+
# we only need an isolated single module from DMD
5+
sourceFiles "../../dmd/compiler/src/dmd/cli.d"
6+
importPaths "source" "../../dmd/compiler/src"
7+
versions "DdocOptions" # for dmd.cli
68
buildRequirements "disallowDeprecations"
79
configuration "executable" {
810
versions "IsExecutable"

ddoc/dub.selections.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"fileVersion": 1,
33
"versions": {
4-
"dmd": {"path":"../../dmd"},
54
"libdparse": "0.15.4",
65
"stdx-allocator": "2.77.5"
76
}

0 commit comments

Comments
 (0)