Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Conversation

@WalterBright
Copy link
Member

blocking dlang/dmd#14164

@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.

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 + druntime#3825"

in
{
assert( dg );
assert( cast(void delegate() const) dg );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this cast needed? It looks like a simple null check.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't a simple null check. It winds up calling dassert() which has overloads for delegates.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks like an issue on its own, assert(dg) should just compile. Is there a bugzilla issue for that or am I missing something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert's inside contracts behave differently.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert's inside contracts behave differently.

Can you elaborate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the error if I leave it unchanged:

src/core/thread/fiber.d(609): Error: none of the overloads of template `core.internal.dassert._d_assert_fail` are callable using argument types `!(void delegate())(string, void delegate())`
src/core/internal/dassert.d(38):        Candidates are: `_d_assert_fail(A)(scope const string op, auto ref scope const A a)`
src/core/internal/dassert.d(63):                        `_d_assert_fail(A...)`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we should add that overload on druntime. Does it make sense to the user to cast it exolicitly to const?

@WalterBright
Copy link
Member Author

The buildkite errors don't seem to be related to this PR.

@WalterBright
Copy link
Member Author

It's hard to see how the buildkite errors have anything to do with this PR.

@WalterBright WalterBright force-pushed the getHashConst branch 4 times, most recently from 51e3eb0 to 1806121 Compare May 26, 2022 06:08
@ljmf00
Copy link
Member

ljmf00 commented May 26, 2022

The buildkite errors don't seem to be related to this PR.

Yeah, it's not. See vibe-d/vibe.d#2661 for context.

{
assert( dg );
// assert( cast(void delegate() const) dg );
// assert( dg );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just delete this code instead of leaving it commented?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I don't know what is triggering the buildkite failures, or if those failures are unrelated to this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The vibe-d and mir-algorithm failures are unrelated and being worked on

@WalterBright
Copy link
Member Author

buildkike/vibe is still failing, although the libmir problem has disappeared.

@Geod24
Copy link
Member

Geod24 commented May 26, 2022

Vibe.d has been fixed. Please remove the code instead of commenting it tho.

@WalterBright
Copy link
Member Author

It's removed now.

@dlang-bot dlang-bot merged commit e588ec4 into dlang:master May 26, 2022
@WalterBright WalterBright deleted the getHashConst branch May 26, 2022 22:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants