Commit graph

16257 commits

Author SHA1 Message Date
Nathan Sashihara
932ce6d17c Fix Issue 24140 - Int128.opBinary [+-*/%&|^] with negative long arguments gives wrong answers 2023-09-12 02:03:09 +02:00
Nathan Sashihara
dcdb02cb6c Fix Issue 24083 - Int128.opCmp's behavior with negative numbers is inconsistent with Int128.opEquals 2023-08-18 20:50:35 -04:00
FeepingCreature
75372efef2
Fix issue 24064: use consistent types for ResultRanges. (#8791)
`source` is `Unqual!Ranges`, not `Ranges`.
2023-08-03 10:10:12 +03: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
Paul Backus
afe5d47167 Fix issue 24028 - BigInt power operator ignores sign of exponent 2023-07-03 12:19:09 -04: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
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
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
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
e394dbec63 Merge remote-tracking branch 'upstream/stable' into merge_stable 2023-06-02 10:21:03 +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
WebFreak001
d35dafbde8 fix 14478: support non-copyable elements in many range algorithms 2023-05-01 18:17:27 +02:00
Denis Feklushkin
2bd1b833f8 Redundant stack grow direction checks removed 2023-04-28 17:36:40 +03:00
FeepingCreature
8a9cfa2677
Fix issue 19642: slide!(No.withPartial): Correctly handle first slide exhausting input range. (#8738) 2023-04-24 12:57:21 +03:00
Nick Treleaven
a3a4bdbb27
Fix cstdio links (#8740)
* Fix cstdio links

Fixes Issue 23834 - std.file : File links to c functions are invalid and
need updating

* Fix whitespace

* No need for prefix underscore
2023-04-24 12:55:48 +03:00
Walter Bright
3ccd2783ab
clarify documentation for std.traits.isIntegral (#8741) 2023-04-24 12:54:42 +03:00
Mathis Beer
2f6b2efaf7 Change struct Rebindable to just use cast() if this is sufficient.
This works better at compiletime.
2023-04-19 22:59:43 +00:00
Mathis Beer
b818901e63 Fix issue 22786 (immutable element in maxElement) by always using Rebindable. 2023-04-19 22:59:43 +00:00
FeepingCreature
656ae7905e
Fix issue 22785: joiner should Unqual child ranges. (#8737)
* Fix issue 22785: `joiner` should `Unqual` child ranges.
This allows use with `immutable T[][]` and similar.

---------

Co-authored-by: Petar Kirov <petar.p.kirov@gmail.com>
2023-04-20 01:59:19 +03:00