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

Revert "std.traits: Adapt unittest to pass with -preview=in" #7611

Merged
merged 1 commit into from
Aug 30, 2020

Conversation

wilzbach
Copy link
Member

Reverts #7609

Checking whether this PR broke the Buildkite sumtype build.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @wilzbach!

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

@wilzbach
Copy link
Member Author

This fixes the Buildkite failure.

@Geod24
Copy link
Member

Geod24 commented Aug 30, 2020

Ergh, sorry about this. Looks like my first commit was not as innocent as I thought, and the bug I encounter might not be in-specific. Which is a relief, in one way.
Thanks for the revert @wilzbach , and I'll investigate what went wrong.

@Geod24
Copy link
Member

Geod24 commented Aug 30, 2020

Narrowed it down to https://issues.dlang.org/show_bug.cgi?id=21210
CC @pbackus , could you fix sumtype so we can fix this bug ?
I also recommend to switch those assert to static assert for better error message next time.

@pbackus
Copy link
Contributor

pbackus commented Aug 30, 2020

@Geod24 Would it be possible to make isRvalueAssignable public so that I can fix this without duplicating Phobos code?

@wilzbach wilzbach merged commit 46f590b into master Aug 30, 2020
@wilzbach wilzbach deleted the revert-7609-std-traits-in-ref branch August 30, 2020 14:48
@wilzbach
Copy link
Member Author

Force-merged as the two Windows machines on the auto-tester seem to be missing in action :/

@Geod24
Copy link
Member

Geod24 commented Aug 30, 2020

@pbackus : That's not going to be of much help, since your code wouldn't compile with older DMD / LDC versions.
In fact, it wouldn't compile at all for the time being, until a new version is released.
The duplication should only be a few LoCs though.

@pbackus
Copy link
Contributor

pbackus commented Aug 30, 2020

@Geod24 I understand that. I'm okay with adding my own copy of isRvalueAssignable as a temporary workaround; I just want to be sure that I'll be able to delete it in a future sumtype release.

pbackus added a commit to pbackus/sumtype that referenced this pull request Aug 30, 2020
Currently, isAssignable is true for non-copyable types, but should be
false. This will be fixed in an upcoming Phobos release, so add a
separate check for non-copyable types to avoid a regression when Phobos
is upgraded.

The symbol std.traits.isRvalueAssignable is currently private, but
expected to become public in a future Phobos release.

See also:
  - dlang issue 21210
  - dlang/phobos#7611
@pbackus
Copy link
Contributor

pbackus commented Aug 30, 2020

@Geod24 Fixed the issue in sumtype and tagged a new release. Tests pass locally with phobos commit aca1e12.

@Geod24
Copy link
Member

Geod24 commented Aug 30, 2020

Follow up #7612

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.

6 participants