Skip to content

Commit 19ddf0c

Browse files
committed
Merge remote-tracking branch 'upstream/master' into newCTFE
2 parents 8358d21 + bdcbb41 commit 19ddf0c

File tree

163 files changed

+51428
-51932
lines changed

Some content is hidden

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

163 files changed

+51428
-51932
lines changed

.codecov.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Documentation: https://github.com/codecov/support/wiki/codecov.yml
22

33
codecov:
4+
ci:
5+
- "circleci.com"
6+
notify:
7+
after_n_builds: 1 # send notifications after the first upload
48
bot: dlang-bot
59

610
coverage:

.dscanner.ini

Lines changed: 108 additions & 23 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/etc/c/zlib/*.obj
2-
/etc/c/zlib/zlib.lib
2+
*.lib
33
/phobos.json
4-
/phobos.lib
54

65
generated
76
GNUmakefile
@@ -10,9 +9,15 @@ GNUmakefile
109
Makefile
1110
*.lst
1211

12+
temp/
13+
tmp/
14+
1315
# Rules for Xamarin Studio project data/build output
1416
*.dproj
1517
bin/
1618
obj/
1719

20+
# Rule for VS Code config folder
21+
.vscode
22+
1823
*.html

CODEOWNERS

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# See also:
2+
# - https://github.com/blog/2392-introducing-code-owners
3+
# - https://help.github.com/articles/about-codeowners/
4+
5+
# Each line is a file pattern followed by one or more owners (sorted alphabetically).
6+
# Please feel free to add yourself to a module or create a new mapping.
7+
# Ideally each module should have two or more owners.
8+
9+
# Code owners are automatically requested for review
10+
# when someone opens a pull request that modifies code that they own.
11+
# Later matches take precedence.
12+
13+
.dscanner.ini @wilzbach
14+
circleci.sh @CyberShadow @MartinNowak @wilzbach
15+
etc/c/* @CyberShadow
16+
posix.mak @CyberShadow @MartinNowak @wilzbach
17+
std/* @andralex
18+
std/algorithm/* @andralex @JackStouffer @wilzbach @ZombineDev
19+
std/array.d @JackStouffer @wilzbach @ZombineDev
20+
std/ascii.d @JackStouffer @wilzbach
21+
# std/base64.d
22+
std/bigint.d @Biotronic
23+
# std/bitmanip.d
24+
std/c/windows/* @CyberShadow
25+
# std/compiler.d
26+
std/complex.d @kyllingstad
27+
std/concurrency.d @MartinNowak
28+
std/container/ @ZombineDev
29+
std/conv.d @JackStouffer
30+
# std/csv.d
31+
std/datetime/* @jmdavis
32+
std/demangle.d @MartinNowak @rainers
33+
std/digest/* @jpf91
34+
# std/encoding.d
35+
# std/exception.d
36+
std/experimental/allocator/* @andralex @wilzbach @ZombineDev
37+
std/experimental/checkedint/* @andralex
38+
std/experimental/logger/* @burner
39+
# std/experimental/typecons.d
40+
std/file.d @CyberShadow
41+
# std/format.d
42+
# std/functional.d
43+
# std/getopt.d
44+
# std/internal/
45+
std/json.d @CyberShadow
46+
std/math* @Biotronic @ibuclaw @klickverbot
47+
std/meta.d @Biotronic @klickverbot @MetaLang @ZombineDev
48+
# std/mmfile.d
49+
std/net/curl.d @CyberShadow
50+
std/net/isemail.d @JackStouffer
51+
# std/numeric.d
52+
# std/outbuffer.d
53+
# std/parallelism.d
54+
std/path.d @CyberShadow @kyllingstad
55+
std/process.d @CyberShadow @kyllingstad @schveiguy
56+
std/random.d @WebDrake @wilzbach
57+
std/range/* @andralex @JackStouffer @wilzbach @ZombineDev
58+
std/regex/* @DmitryOlshansky
59+
# std/signals.d
60+
std/socket.d @CyberShadow @klickverbot
61+
# std/stdint.d
62+
std/stdio.d @CyberShadow @schveiguy
63+
std/string.d @burner @JackStouffer
64+
# std/system.d
65+
std/traits.d @Biotronic @klickverbot @ZombineDev
66+
std/typecons.d @Biotronic @MetaLang @ZombineDev
67+
# std/typetuple.d
68+
std/uni.d @DmitryOlshansky
69+
# std/uri.d
70+
std/utf.d @jmdavis
71+
std/uuid.d @jpf91
72+
# std/variant.d
73+
std/windows/* @CyberShadow
74+
# std/xml.d
75+
std/zip.d @CyberShadow
76+
std/zlib.d @CyberShadow

Jenkinsfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/env groovy
2+
3+
def clone (repo_url, git_ref = "master") {
4+
checkout(
5+
poll: false,
6+
scm: [
7+
$class: 'GitSCM',
8+
branches: [[name: git_ref]],
9+
extensions: [[$class: 'CleanBeforeCheckout']],
10+
userRemoteConfigs: [[url: repo_url]]
11+
]
12+
)
13+
}
14+
15+
def pipeline
16+
node {
17+
dir('dlang/ci') {
18+
clone 'https://github.com/dlang/ci.git', 'master'
19+
}
20+
pipeline = load 'dlang/ci/pipeline.groovy'
21+
}
22+
pipeline.runPipeline()
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
`Base64URLNoPadding` (URL-safe Base64 without padding) was added
2+
3+
$(REF Base64URLNoPadding, std, base64) allows encoding/decoding without padding:
4+
5+
---
6+
import std.base64 : Base64URLNoPadding;
7+
8+
ubyte[] data = [0x83, 0xd7, 0x30, 0x7b, 0xef];
9+
assert(Base64URLNoPadding.encode(data) == "g9cwe-8");
10+
assert(Base64URLNoPadding.decode("g9cwe-8") == data);
11+
---

changelog/std-digest-package.dd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
`std.digest.digest` was renamed to `std.digest`.
2+
3+
$(B Motivation):
4+
5+
The fully qualified name of the digest function template was `std.digest.digest.digest`.
6+
This is because `std.digest` is a package, with a module named `digest` in it, and the function `digest` inside that.
7+
8+
$(MREF std, digest) contains the former `std.digest.digest` package.

changelog/std-format-formattedRead-only-pointers.dd

Lines changed: 0 additions & 2 deletions
This file was deleted.

changelog/std-meta-stride.dd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
`std.meta.Stride` was added
2+
3+
$(REF Stride, std,meta) allows selecting a subset of template by a step size and offset:
4+
5+
---
6+
alias attribs = AliasSeq!(short, int, long, ushort, uint, ulong);
7+
static assert(is(Stride!(3, attribs) == AliasSeq!(short, ushort)));
8+
static assert(is(Stride!(3, attribs[1 .. $]) == AliasSeq!(int, uint)));
9+
---
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
`Config.detached` flag for `spawnProcess` has been added
2+
3+
`Config.detached` allows $(REF_ALTTEXT spawning processes, spawnProcess, std, process) which run independently from the current process. There is no need to wait on the processes created with this flag, and no $(HTTPS en.wikipedia.org/wiki/Zombie_process, zombie process) will be left after they exit.
4+
Attempts to call $(REF wait, std, process) or $(REF kill, std, process) on detached processes will throw.

changelog/std-random-MersenneTwisterEngine.dd

Lines changed: 0 additions & 21 deletions
This file was deleted.

changelog/std-range-bitwise.dd

Lines changed: 0 additions & 11 deletions
This file was deleted.

changelog/std-range-input-chunks.dd

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
`std.range.chunks` was extended to support non-forward input ranges.
2+
3+
Now `std.range.chunks` can be used with input ranges that are not forward
4+
ranges, albeit with limited semantics as imposed by the underlying range.
5+
6+
---
7+
import std.algorithm.comparison : equal;
8+
9+
int i;
10+
11+
// The generator doesn't save state, so it cannot be a forward range.
12+
auto inputRange = generate!(() => ++i).take(10);
13+
14+
// We can still process it in chunks, but it will be single-pass only.
15+
auto chunked = inputRange.chunks(2);
16+
17+
assert(chunked.front.equal([1, 2]));
18+
assert(chunked.front.empty); // Iterating the chunk has consumed it
19+
chunked.popFront;
20+
assert(chunked.front.equal([3, 4]));
21+
---

changelog/std-socket-abstract.dd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
`std.socket.UnixAddress` now supports abstract addresses.
2+
3+
UNIX domain sockets are usually identified by pathnames. Linux offers a
4+
non-portable extension to this scheme, known as abstract socket addresses,
5+
which are independent of the filesystem. An abstract socket address starts with
6+
a null byte (`'\0'`), e.g.:
7+
8+
---
9+
auto addr = new UnixAddress("\0/tmp/dbus-OtHLWmCLPR");
10+
---

changelog/std-stdio-readf-only-pointers.dd

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Added possibility to use a baseclass when auto-implementing an interface
2+
3+
A second $(REF AutoImplement, std, typecons) template has been added, which
4+
differs from the existing one in accepting an extra type parameter. The extra
5+
parameter specifies a class to derive from while auto-implementing an interface.
6+
7+
The base class used may contain non-default constructors. Matching constructors
8+
will be created in the auto-implemented class and be implemented as just a call
9+
to super with all arguments.

changelog/std-utf-decodeBack.dd

Lines changed: 0 additions & 11 deletions
This file was deleted.

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ dependencies:
66

77
test:
88
override:
9-
- ./circleci.sh style
109
- ./circleci.sh setup-repos
10+
- ./circleci.sh style_lint
1111
- ./circleci.sh publictests
1212
- ./circleci.sh coverage:
1313
parallel: true

circleci.sh

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ setup_repos()
9595
}
9696
9797
# verify style guide
98-
style()
98+
style_lint()
9999
{
100100
# dscanner needs a more up-to-date DMD version
101101
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$DSCANNER_DMD_VER --activate)"
102102
103-
make -f posix.mak style
103+
make -f posix.mak style_lint DUB=$DUB
104104
}
105105
106106
# run unittest with coverage
@@ -110,27 +110,38 @@ coverage()
110110
# remove all existing coverage files (just in case)
111111
rm -rf $(find -name '*.lst')
112112
113-
# currently using the test_runner yields wrong code coverage results
114-
# see https://github.com/dlang/phobos/pull/4719 for details
115-
ENABLE_COVERAGE="1" make -f posix.mak MODEL=$MODEL unittest-debug
113+
# Coverage information of the test runner can be missing for some template instatiations.
114+
# https://issues.dlang.org/show_bug.cgi?id=16397
115+
# ENABLE_COVERAGE="1" make -j$N -f posix.mak MODEL=$MODEL unittest-debug
116116
117-
# instead we run all tests individually
118-
make -f posix.mak $(find std etc -name "*.d" | sed "s/[.]d$/.test")
117+
# So instead we run all tests individually (hoping that that doesn't break any tests).
118+
# -cov is enabled by the %.test target itself
119+
make -j$N -f posix.mak $(find std etc -name "*.d" | sed "s/[.]d$/.test/")
120+
121+
# Remove coverage information from lines with non-deterministic coverage.
122+
# These lines are annotated with a comment containing "nocoverage".
123+
sed -i 's/^ *[0-9]*\(|.*nocoverage.*\)$/ \1/' ./*.lst
119124
}
120125
121-
# compile all public unittests separately
126+
# extract publictests and run them independently
122127
publictests()
123128
{
124-
clone https://github.com/dlang/tools.git ../tools master
125-
# fix to a specific version of https://github.com/dlang/tools/blob/master/phobos_tests_extractor.d
126-
git -C ../tools checkout 184f5e60372d6dd36d3451b75fb6f21e23f7275b
127-
make -f posix.mak publictests DUB=$DUB
129+
# checkout a specific version of https://github.com/dlang/tools
130+
if [ ! -d ../tools ] ; then
131+
clone https://github.com/dlang/tools.git ../tools master
132+
fi
133+
git -C ../tools checkout df3dfa3061d25996ac98158d3bdb3525c8d89445
134+
135+
make -f posix.mak -j$N publictests DUB=$DUB
128136
}
129137
130138
case $1 in
131139
install-deps) install_deps ;;
132140
setup-repos) setup_repos ;;
133141
coverage) coverage ;;
134-
style) style ;;
135142
publictests) publictests ;;
143+
style_lint) style_lint ;;
144+
# has_public_example has been removed and is kept for compatibility with older PRs
145+
has_public_example) echo "OK" ;;
146+
*) echo "Unknown command"; exit 1;;
136147
esac

etc/c/curl.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535

3636
module etc.c.curl;
3737

38-
import core.stdc.time;
3938
import core.stdc.config;
39+
import core.stdc.time;
4040
import std.socket;
4141

4242
// linux
@@ -117,7 +117,7 @@ alias curl_socket_t = socket_t;
117117
/// jdrewsen - Would like to get socket error constant from std.socket by it is private atm.
118118
version(Windows)
119119
{
120-
private import core.sys.windows.windows, core.sys.windows.winsock2;
120+
import core.sys.windows.windows, core.sys.windows.winsock2;
121121
enum CURL_SOCKET_BAD = SOCKET_ERROR;
122122
}
123123
version(Posix) enum CURL_SOCKET_BAD = -1;

etc/c/odbc/sql.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ flags (e.g. for dmd, `-L-lodbc` on Posix and `-Lodbc32.lib` on Windows) to link
1818
with the ODBC library. On Windows, using $(D pragma(lib, "odbc32")) in D
1919
code at top level is also appropriate.
2020
21-
See_Also: $(LUCKY ODBC API Reference on MSN Online)
21+
See_Also: $(LINK2 https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/odbc-api-reference,
22+
ODBC API Reference on MSN Online)
2223
*/
2324

2425
module etc.c.odbc.sql;

etc/c/odbc/sqlext.d

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ original announcement)).
88
99
`etc.c.odbc.sqlext` corresponds to the `sqlext.h` C header file.
1010
11-
See_Also: $(LUCKY ODBC API Reference on MSN Online)
11+
See_Also: $(LINK2 https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/odbc-api-reference,
12+
ODBC API Reference on MSN Online)
1213
*/
1314

1415
module etc.c.odbc.sqlext;
1516

16-
private import etc.c.odbc.sql;
17-
private import etc.c.odbc.sqltypes;
17+
import etc.c.odbc.sql;
18+
import etc.c.odbc.sqltypes;
1819

1920
extern (Windows):
2021

etc/c/odbc/sqltypes.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ original announcement)).
88
99
`etc.c.odbc.sqlext.d` corresponds to the `sqlext.h` C header file.
1010
11-
See_Also: $(LUCKY ODBC API Reference on MSN Online)
11+
See_Also: $(LINK2 https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/odbc-api-reference,
12+
ODBC API Reference on MSN Online)
1213
*/
1314
module etc.c.odbc.sqltypes;
1415

0 commit comments

Comments
 (0)