phobos icon indicating copy to clipboard operation
phobos copied to clipboard

std.typecons: Greatly simplify scoped()

Open kinke opened this issue 2 years ago • 8 comments

The previous implementation was just terrible, presumably dating back to when align(N) was buggy.

kinke avatar May 13 '22 14:05 kinke

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

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

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#8460"

dlang-bot avatar May 13 '22 14:05 dlang-bot

FYI @ljmf00.

kinke avatar May 13 '22 14:05 kinke

Ahhhhhgg, we are having the same problem as the TLS alignment on druntime.

ljmf00 avatar May 13 '22 17:05 ljmf00

Yeah, looks like there's a corresponding DMD backend issue for 32-bit COFF too. :(

kinke avatar May 13 '22 17:05 kinke

Blocked by https://issues.dlang.org/show_bug.cgi?id=16098.

kinke avatar Jun 20 '22 12:06 kinke

@kinke Windows CI tests are failing:

object.Error@(0): Access Violation
----------------
0x02A3E8ED in rt_finalize2
0x019AF400 in object.destroy!(false, std.typecons.__unittest_L8826_C9.C1long).destroy at D:\a\1\dmd\druntime\import\object.d(4154)
0x019C8577 in std.typecons.__unittest_L8826_C9.alignmentTest at D:\a\1\phobos\std\typecons.d(8856)
0x019C8526 in std.typecons.__unittest_L8826_C9 at D:\a\1\phobos\std\typecons.d(8874)
0x02A4FCB3 in int object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)).__lambda2(immutable(object.ModuleInfo*))
0x02A4D0A6 in _d_run_main2
0x02A37234 in _d_run_main
0x00FBEECC in unittest._d_cmain!().main at D:\a\1\dmd\druntime\import\core\internal\entrypoint.d(30)
0x771105C9 in BaseThreadInitThunk
0x776E784D in RtlGetAppContainerNamedObjectPath
0x776E781D in RtlGetAppContainerNamedObjectPath
1/133 modules FAILED unittests

PetarKirov avatar Mar 27 '23 07:03 PetarKirov

Yeah, same issue as ~a year ago. I assumed the compiler fix for https://issues.dlang.org/show_bug.cgi?id=16098 finally fixed this for DMD, but no it didn't.

kinke avatar Mar 27 '23 11:03 kinke