Commit graph

20059 commits

Author SHA1 Message Date
Dennis
ac7e69151d
Fix 24049 - std.conv.to: string to enum conversion is not documented (#8784)
* Fix 24049 - std.conv.to: string to enum conversion is not documented

* Update std/conv.d

Co-authored-by: Max Haughton <maxhaton@gmail.com>

---------

Co-authored-by: Max Haughton <maxhaton@gmail.com>
2023-07-24 11:21:52 +03:00
Iain Buclaw
62f8d03978 Merge remote-tracking branch 'upstream/master' into stable 2023-07-15 15:31:38 +00:00
Iain Buclaw
330d6a4fdb
Merge pull request #8782 from ibuclaw/merge_stable
merge stable
2023-07-15 17:18:10 +02:00
Iain Buclaw
faca94c214 Fix broken tests caused by merge conflicts 2023-07-15 14:15:20 +00:00
Iain Buclaw
ab307c9acf Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-07-15 13:49:21 +00:00
Iain Buclaw
105bc4508c Remove declarations with expired deprecations 2023-07-04 21:37:48 +02:00
Mathis Beer
2649d6fe1b Add warning to std.json that it doesn't play well with the GC.
Production experience as well as synthetic tests have shown that std.json's use of associative arrays combined with GC issues causes heavy heap fragmentation. Furthermore, its heavy GC usage makes it unperformant in a threaded environment.
Despite this, people keep using std.json for production workloads, then being disappointed when it doesn't measure up. So let's warn them upfront.
2023-07-04 12:24:25 +02:00
FeepingCreature
dfcbee7056 Fix issue 24027: Instead of a bunch of special-cases, just check that Rebindable did in fact alias itself away.
This looks ugly, but it's just for the `stable` branch - this is fixed on `master` via the `Rebindable2` rewrite https://github.com/dlang/phobos/pull/8768
2023-07-04 01:31:32 +02:00
Dennis
21372971ce
Merge pull request #8779 from pbackus/fix-24028
Fix issue 24028 - BigInt power operator ignores sign of exponent
2023-07-03 19:26:50 +02:00
Paul Backus
afe5d47167 Fix issue 24028 - BigInt power operator ignores sign of exponent 2023-07-03 12:19:09 -04:00
Iain Buclaw
1921d29df2
Merge pull request #8776 from ibuclaw/merge_stable
merge stable
2023-07-02 09:29:43 +02:00
Iain Buclaw
a3526d11dd Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-07-02 02:10:20 +00:00
Nick Treleaven
b455568099
[std/traits] Improve getSymbolsByUDA test (#8774)
This is also necessary for https://github.com/dlang/dmd/pull/15363.
2023-06-28 16:22:15 +03:00
Dennis
5a3ac67c13
Merge pull request #8764 from FeepingCreature/fix/issue-23993-discard-rebindable-before-calling-compare
Fix issue 23993: Discard Rebindable before passing extremum to compar…
2023-06-28 11:47:53 +02:00
Dennis
613850c89a
Merge pull request #8773 from FeepingCreature/fix/issue-23976
Fix issue 23976: std.range.slide fails in dmd-2.104.0
2023-06-23 19:48:20 +02:00
Mathis Beer
1d2b992c44 Fix issue 23976: std.range.slide fails in dmd-2.104.0
I think possibly `hasShownPartialBefore` is just simply wrongly named in the `withPartial` branch.
2023-06-23 07:27:09 +02:00
Vladimir Panteleev
b1612bbc38
Fix Issue 23997 - isClose(1, -double.infinity) returns true (#8767) 2023-06-22 17:41:44 +03:00
Walter Bright
33f63dbd5d
std.stdio: add glossary, fileno_t (#8772) 2023-06-22 17:41:08 +03:00
Walter Bright
b3e664e174
Merge pull request #8770 from WalterBright/setmode
fix Issue 23312 - Crash when calling writeln in WinMain
2023-06-21 11:24:52 -07:00
Dennis
7f10ebc7fa
Merge pull request #8768 from FeepingCreature/feature/add-typecons-rebindable2
Add std.typecons.Rebindable2 for internal use.
2023-06-21 11:54:10 +02:00
Dennis
e411f326c1
Merge pull request #8771 from WalterBright/stdio-version
std.stdio: add default case
2023-06-21 11:37:31 +02:00
Walter Bright
e690d40e0b std.stdio: add default case 2023-06-21 01:46:06 -07:00
Walter Bright
cdf9ce5e51 fix Issue 23312 - Crash when calling writeln in WinMain 2023-06-21 01:33:33 -07:00
Mathis Beer
10601cc046 Add std.typecons.Rebindable2 for internal use.
Rebindable2 is a simplified version of std.typecons.Rebindable that clears up every special case: classes, arrays and structs now have the same struct.
Whichever type you instantiate `Rebindable2` with, you always get the same type out by calling `value.get` on the resulting container.
Also use this type to simplify the parts of Phobos we previously used `Rebindable` for.
2023-06-19 13:24:30 +02:00
Dennis
623a2af71b
Merge pull request #8763 from dukc/unicode-purity
fix issue 23361 - std.uni.normalize made pure
2023-06-18 14:45:11 +02:00
Dennis
5cd77a6e32
User hyperlinks to refer to bugzilla issues (#8766) 2023-06-16 14:45:44 +03:00
Iain Buclaw
f2ea143b49
Merge pull request #8765 from ibuclaw/merge_stable
merge stable
2023-06-16 10:26:47 +02:00
Iain Buclaw
449256b816 Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-06-15 22:14:10 +00:00
FeepingCreature
f715941036 Fix issue 23993: Discard Rebindable before passing extremum to comparator. 2023-06-15 19:06:27 +02:00
Ate Eskola
fdd3a2d961 Removed changelog entry. 2023-06-15 19:00:57 +03:00
Richard (Rikki) Andrew Cattermole
f22cc260f8
Improve std.regex wordMatcher build times by delaying its work from CT to RT if possible (#8699) 2023-06-15 09:44:40 +03:00
Ate Eskola
e6ed401821 fix issue 23361 - std.uni.normalize made pure 2023-06-14 20:38:24 +03:00
Dmytro Katyukha
f263028f11 std.path.absolutePath: make compatible with scope and preview='in'
When using `absolutePath` with 'priview=in' enabled,
it requires to duplicate value to be able to call this function.
Within this commit the signature of `absolutePath` function
is changed from `string absolutePath(string path, lazy string base = getcwd())`
to `string absolutePath(return scope const string path, lazy string base = getcwd())`
thus, after this commit it is possible to use this func in scope context.

Example case:

```d
/+ dub.sdl:
    name "dub-example"
    dflags "-preview=in" "-preview=dip1000"
+/

import std.stdio;
import std.path;

@safe:

    string fun(in string path) {
        return path.absolutePath;
    }

    void main() {
        string p = fun("~/tests/1");
        writefln("P: %s", p);
    }

```
2023-06-03 01:21:02 +02:00
Iain Buclaw
8d3800bee2
Merge pull request #8761 from ibuclaw/merge_stable
merge stable
2023-06-02 15:47:39 +02:00
Iain Buclaw
e394dbec63 Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-06-02 10:21:03 +00:00
Iain Buclaw
ac19f9474c purge changelog 2023-06-02 10:05:15 +00:00
RazvanN7
5d61a31133 Don't use this in static context in std.range.package 2023-05-31 01:26:21 +02:00
Jan Jurzitza
f8c80db44e
Fix upcoming D-Scanner argument warnings (#8753)
* upgrade D-Scanner

* Fix upcoming D-Scanner argument checks
2023-05-30 09:42:02 +03:00
Johan Engelen
75a507f883
typecons: fix use-after-scope bug in RefCounted unittest (#8751)
* typecons: fix use-after-scope bug in RefCounted unittest

The access through `p` to `rc1` outside the scope of `rc1` is undefined behavior. We have to artificially end the scope of `rc1` and `rc2`, such that within the same scope we can check that the destructor calls do the correct thing of nulling the `_store`.

* fixup

* fixup
2023-05-29 16:00:15 +03:00
Vladimir Panteleev
cca8661113 Fix Issue 23940 - std.getopt does not assert with options that only differ in case with config.caseInsensitive 2023-05-27 17:38:25 +02:00
Robert burner Schadek
e1f7edae57 Better std.algorithm.iteration.permutations error messages 2023-05-26 05:45:32 +02:00
Dmytro Katyukha
9fadf8ad49 std.path.expandTilde: make compatible with scope and preview='in'
When using `expandTilde` with 'priview=in' enabled,
it requires to duplicate value to be able to call this function.
Within this commit the signature of expandTilde function is
changed from `string expandTilde(string inputPath) @safe nothrow`
to `string expandTilde(return scope const string inputPath) @safe nothrow`
thus, after this commit it is possible to use this func in scope
context.

Example case:

```d
/+ dub.sdl:
    name "dub-example"
    dflags "-preview=in" "-preview=dip1000"
+/

import std.stdio;
import std.path;

@safe:

    string fun(in string path) {
        return path.expandTilde;
    }

    void main() {
        string p = fun("~/tests/1");
        writefln("P: %s", p);
    }
```
2023-05-23 01:51:57 +02:00
Dennis
43be08c3a7
Merge pull request #8755 from WalterBright/druntimeToString
std.conv integer to string: use core.internal.string
2023-05-21 19:19:28 +02:00
Walter Bright
171a780728 delete unused overload of std.conv.convError() 2023-05-21 16:57:07 +02:00
Walter Bright
4a1210ea1c std.conv integer to string: use core.internal.string 2023-05-20 23:23:26 -07:00
Dennis
cf97c75385
Merge pull request #8736 from FeepingCreature/fix/issue-23844-immutable-chain
Fix issue 23844: Support ranges with immutable fields (like `only` with `immutable struct`) in `chain`.
2023-05-10 11:54:08 +02:00
Cameron Ross
6ff44ed666
fix issue 23881: add std.system.instructionSetArchitecture and std.system.ISA (#8744) 2023-05-09 15:37:29 +03:00
Walter Bright
9eb1f83403 std.conv handle default integer-to-string with core.internal.string 2023-05-08 11:30:48 +02:00
Mathis Beer
b9c6e3ca4b Fix issue 23844: Support ranges with immutable fields (like only with immutable struct) in chain.
`only` is a range that may be *mutable*, but not *assignable*. `chain` falls over here because it assumes it can make a struct with ranges, and reassign them with new values, which isn't necessarily the case even if the ranges are not `const`.
Solved by creating a separate tuple of `Rebindable` ranges for this case.
2023-05-03 13:56:04 +02:00
Iain Buclaw
8ab95ded52
Merge pull request #8743 from ibuclaw/merge_stable
Add bind to the header table (#8731)
2023-05-02 04:09:03 +02:00