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

fix #20617 Move constructors should not be POD #20618

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WalterBright
Copy link
Member

Blocked by #20616

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

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.

⚠️⚠️⚠️ 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 + dmd#20618"

@WalterBright WalterBright force-pushed the g20617 branch 4 times, most recently from 4cff3b3 to 5ba46cd Compare December 30, 2024 01:48
@WalterBright
Copy link
Member Author

I have no idea what this useless message means:

Executing: /home/runner/work/dmd/dmd/compiler/test/test_results/d_do_test-ut
1 modules passed unittests
Test directive `BAD` must be followed by a `:`
 ... runnable/test20855.d            -fPIC (-O)
 ... runnable/test18545.d            -fPIC (-inline -release -g -O)
 ... runnable/test28.d               -fPIC (-inline -release -g -O)
 ... runnable/test34.d               -fPIC (-inline -release -g -O)
 ... runnable/lazy.d                 -fPIC (-inline -release -g -O)
 ... runnable/test42.d               -fPIC (-inline -release -g -O)
 ... runnable/argufilem.d            -fPIC (-inline -release -g -O)
 ... runnable/xtest46.d             -preview=rvaluerefparam  -fPIC (-inline -release -g -O)
 ... runnable/xtest46_gc.d          -lowmem -Jrunnable -preview=rvaluerefparam  -fPIC (-inline -release -g -O)
 ... runnable/testgc3.d              -fPIC ()
 ... runnable/link14588.d            -fPIC (-allinst -unittest -debug -inline)
 ... runnable/link13415.d           -inline  -fPIC (-allinst -unittest -debug)
 ... runnable/paranoia.d             -fPIC ()
 ... runnable/template9.d           -preview=rvaluerefparam  -fPIC ()
 ... runnable/test23148.sh
 ... runnable/testassert_release.d   -fPIC (-checkaction=context)
 ... runnable/cov2.d                -cov  -fPIC ()
 ... runnable/test23083.d            -fPIC (-inline -release -g -O)
 ... runnable/test1[70](https://github.com/dlang/dmd/actions/runs/12540628566/job/34968140892?pr=20618#step:12:71)72.d           -inline  -fPIC (-release -O)
 ... runnable/test809.d              -fPIC (-inline -release -g -O)
 ... runnable/issue24401.d           -fPIC ()
 ... runnable/test3449.d             -fPIC (-inline -release -g -O)
 ... runnable/test19086.d           -g -L-export-dynamic  -fPIC ()
 ... runnable/test22376.c            -fPIC (-inline -release -g -O)
 ... runnable/sroa13220.d           -O -inline -boundscheck=off  -fPIC (-release -g)
 ... runnable/test21822.d            -fPIC (-inline -release -g -O)
 ... runnable/link14198a.sh
Failed to compile the `unit` test executable! (exit code -11)

@WalterBright
Copy link
Member Author

What is the unit test executable? And why is there no message about what the error is?

@thewilsonator
Copy link
Contributor

I think that refers to https://github.com/dlang/dmd/tree/master/compiler/test/unit those tests

@WalterBright
Copy link
Member Author

Sadly, run.d neglects to mention where it is getting the dmd compiler to run from, etc., and how that can be redirected. The error message comes from the file unit_test_runner.d, which suffers from a near total lack of documentation. It has a main(), but has no instructions on how to build it, or even what files are needed.

We should go back to makefiles.

@thewilsonator
Copy link
Contributor

Looking into it more closely https://github.com/dlang/dmd/blob/master/compiler/test/run.d#L132 is the command that is run when "unit test" is printed.

@thewilsonator
Copy link
Contributor

#20620

@WalterBright WalterBright force-pushed the g20617 branch 2 times, most recently from e057731 to 306f79f Compare December 31, 2024 01:46
@WalterBright
Copy link
Member Author

I have sadly come to the conclusion that proper move constructors will break existing code. It seems to happen too much. This means that proper move construction can only happen when there are also copy constructors, as having both a move and a copy constructor has been previously disallowed. This is not too great a burden, as having a move constructor without a copy constructor doesn't seem to make much sense.

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.

3 participants