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

[WIP] Upgrade frontend & libs to v2.111 #4877

Draft
wants to merge 661 commits into
base: master
Choose a base branch
from
Draft

[WIP] Upgrade frontend & libs to v2.111 #4877

wants to merge 661 commits into from

Conversation

kinke
Copy link
Member

@kinke kinke commented Mar 14, 2025

No description provided.

dkorpel and others added 30 commits January 4, 2025 14:38
Print match level for ambiguous overloads
It is overly short and inconsistent with the rest of the file.
[parse.d] fix documentation for `parseAssignCondition`
replace `prm` with `param` in `statement.d`
…ource-path-dmd

Fix invalid "Source: " links in druntime module ddocs
Co-authored-by: Dennis Korpel <dennis@sarc.nl>
…ource-path-dmd

Replace remaining github links with $(DRUNTIMESRC) in druntime module ddocs
Fix building druntime with all possible `-debug=` flags
@kinke
Copy link
Member Author

kinke commented Mar 14, 2025

Okay, this isn't in a too bad state, especially considering the many accumulated changes for v2.111; most tests are passing, only about 10 failures remaining. We could work on the rest in parallel, by creating PRs against this merge-2.111 branch.

TODO:

  • I haven't resolved most merge conflicts for the druntime integration test Makefiles yet, which have been significantly reworked upstream:
    $ git grep "<<<< HEAD"
    runtime/druntime/test/common.mak:<<<<<<< HEAD
    runtime/druntime/test/shared/Makefile:<<<<<<< HEAD
    runtime/druntime/test/shared/Makefile:<<<<<<< HEAD
    runtime/druntime/test/shared/Makefile:<<<<<<< HEAD
    runtime/druntime/test/stdcpp/Makefile:<<<<<<< HEAD
    
    @the-horo: Maybe you wanna have a stab at it, or perhaps even did some LDC porting already? You know everything about the new system. I hope most LDC-specifics in these files are guarded by checking whether DMD contains ldmd2, or at least provide comments wrt. what was added/changed.
  • timetrace - some things were upstreamed and now 'conflict' (yeah, even a couple of warnings wrt. duplicate C++ symbol definitions...). Maybe @JohanEngelen or @thewilsonator wanna consolidate these?
  • apparent CTFE regression wrt. overlapping initializers for unions: ICE: overlapping initializers for struct literal #4374 (comment). I'll try to fix that in the DMD frontend, don't wanna have to re-deal with that crap in LDC codegen. - edit: Overlapping field initialization in CTFE-generated union literal dlang/dmd#20675; not a CTFE regression (existing issue), but now surfaces after std.json changes in v2.111; [stable] std.json: Avoid setting union members, set the whole union instead dlang/phobos#10683
  • apparent frontend regression wrt. lvalue-ness of indexed cast AA (lit-test compilable/gh3162.d) - edit: [REG2.111] Indexing a *cast* AA yields no lvalue anymore dlang/dmd#21020
  • adapt LDC codegen to removed _d_newThrowable (runnable/test19317.d)
  • add support for placement new (runnable/placenew.d)
  • reggae can't be compiled with v2.111, apparently due to a Phobos std.getopt regression, wrt. const(string)[] IIRC (=> const is the problem) - edit: [REG2.111] std.getopt doesn't accept const(string)[] anymore dlang/phobos#10680
  • probably have to minimally adapt a unittest assertion in std.experimental.allocator.building_blocks.allocator_list for macOS arm64
  • probably have to disable new runnable/exe1.c; seems to test edge cases for compiling C only (former DMC backend tests or something...)

kinke added 2 commits March 15, 2025 18:01
Fixes the regression for dmd-testsuite's `runnable/test19317.d`.
Fixes new `runnable/placenew.d`.
@the-horo
Copy link
Contributor

@the-horo: Maybe you wanna have a stab at it, or perhaps even did some LDC porting already? You know everything about the new system. I hope most LDC-specifics in these files are guarded by checking whether DMD contains ldmd2, or at least provide comments wrt. what was added/changed.

Sure. When I rewrote the makefiles upstream I did think somewhat of ldc but I didn't test anything. I'm a bit busy atm but I'll see what I can do

@the-horo
Copy link
Contributor

  • timetrace - some things were upstreamed and now 'conflict' (yeah, even a couple of warnings wrt. duplicate C++ symbol definitions...). Maybe @JohanEngelen or @thewilsonator wanna consolidate these?

#4880 (those warning are errors on my system)

@the-horo
Copy link
Contributor

I haven't resolved most merge conflicts for the druntime integration test Makefiles yet, which have been significantly reworked upstream:

$ git grep "<<<< HEAD"
runtime/druntime/test/common.mak:<<<<<<< HEAD
runtime/druntime/test/shared/Makefile:<<<<<<< HEAD
runtime/druntime/test/shared/Makefile:<<<<<<< HEAD
runtime/druntime/test/shared/Makefile:<<<<<<< HEAD
runtime/druntime/test/stdcpp/Makefile:<<<<<<< HEAD

@the-horo: Maybe you wanna have a stab at it, or perhaps even did some LDC porting already? You know everything about the new system. I hope most LDC-specifics in these files are guarded by checking whether DMD contains ldmd2, or at least provide comments wrt. what was added/changed.

https://github.com/the-horo/ldc/tree/refs/heads/pr-2.111. It worked fine for my one test locally on linux but the other environments might still have issues.

@kinke
Copy link
Member Author

kinke commented Mar 17, 2025

Thanks a lot Andrei!

@the-horo
Copy link
Contributor

Alright, some progress has been made. The tests are running but some of them are failing. importc_compare fails on every platform but there are some other failures as well.

@the-horo
Copy link
Contributor

My action plan right now is:

  1. isolate and fix the newly failing tests
  2. go through the logs and check that no tests started being accidentally skipped
  3. run the tests linking druntime both statically and dynamically when -DBUILD_SHARED_LIBS=BOTH

@kinke
Copy link
Member Author

kinke commented Mar 17, 2025

I suggest you open a PR with that branch; we can remove your 1st commit from #4880 once the timetrace mess has been dealt with (too bad you're getting errors instead of warnings, but oh well). Then we can discuss the druntime integration tests stuff there. And please don't worry too much about remaining failures; once I see them in the CI logs, I can help out as well. Resolving the merge conflicts was already a great help.

  1. run the tests linking druntime both statically and dynamically when -DBUILD_SHARED_LIBS=BOTH

Oh, cool stuff! But please keep that separate, in another PR.

@the-horo
Copy link
Contributor

I suggest you open a PR with that branch; we can remove your 1st commit from #4880 once the timetrace mess has been dealt with (too bad you're getting errors instead of warnings, but oh well). Then we can discuss the druntime integration tests stuff there. And please don't worry too much about remaining failures; once I see them in the CI logs, I can help out as well. Resolving the merge conflicts was already a great help.

Here you go: #4883

….111

Conflicts:
	dmd/declaration.h
	dmd/expression.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.