Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge stable #9086

Merged
merged 13 commits into from
Nov 17, 2024
Merged

Merge stable #9086

merged 13 commits into from
Nov 17, 2024

Conversation

kinke
Copy link
Contributor

@kinke kinke commented Nov 17, 2024

No description provided.

veelo and others added 13 commits July 22, 2024 06:47
* Allow `new shared FileLogger()`

* Address review comment

* Update documentation.

Fix Bugzilla 23487 - std.experimental.logger assigning FileLogger to sharedLog no longer works

* Comment on `trusted` section.

---------

Co-authored-by: Atila Neves <[email protected]>
Fix issue 24686: SumType stopped working with unmatched DeducedParame…
dlang#9043)

* Fix Bugzilla Issue 24095 - std.bitmanip.bitfields no longer works with bool enum types

* Fix trailing whitespace

* Remove extra space
…ly. (dlang#9067)

Rebindable2 did not handle types with opAssign correctly, which affected
both minElement and maxElement. Namely, Rebindable2 assigned to memory
which was not properly initialized when the correct solution in such a
situation is to use copyEmplace. Assignment works when assignment is
just a memcpy, but in the general case, opAssign needs to have a
properly initialized object in order to work correctly. copyEmplace
instead copies the object and then places the copy into the unitialized
memory, so it avoids assigning to uninitialized memory.

This commit also adds additional tests for types with destructors (which
do get opAssign automatically) and types with postblit constructors or
copy constructors to try to ensure that the code is doing the correct
thing in those cases with regards to copying, assignment, and
destruction.

https://issues.dlang.org/show_bug.cgi?id=24829 was found in the process,
and this does not fix that. Namely, types which cannot be assigned to
and which also have a postblit constructor or copy constructor do not
get copied correctly. So, among the tests added here are commented out
tests for that case, since they're an altered version of some of the
enabled tests. However, fixing that issue would be involved enough that
I'm not attempting to fix it at this time.
…s in stable sort

Uses a regular initialized temporary array when sorting elements with an elaborate assignment to avoid undefined behavior when destructors, postblits or copy constructors are invoked during the array assignment.
[stable] Cherry-pick 2 master fixes

Signed-off-by: Jonathan M Davis <[email protected]>
Merged-on-behalf-of: Martin Kinkelin <[email protected]>
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

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 references

Auto-close Bugzilla Severity Description
23487 regression std.experimental.logger assigning FileLogger to sharedLog no longer works
24095 regression std.bitmanip.bitfields no longer works with bool enum types
24637 regression [REG 2.104] Cannot insert const/immutable elements into DList
24773 normal Stable sort() invokes the destructor on uninitialized elements
24809 normal In some cases, stable sort assigns to unininitialized elements
24824 major std.process.browse returns on failure in forked child
24827 normal maxElement does not correctly handle types with opAssign

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

  • In preparation for migrating from Bugzilla to GitHub Issues, the issue reference syntax has changed. Please add the word "Bugzilla" to issue references. For example, Fix Bugzilla Issue 12345 or Fix Bugzilla 12345.(Reminder: the edit needs to be done in the Git commit message, not the GitHub pull request.)

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#9086"

@dlang-bot dlang-bot merged commit edf6fb9 into dlang:master Nov 17, 2024
9 checks passed
@kinke kinke deleted the merge_stable branch November 17, 2024 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants