-
-
Notifications
You must be signed in to change notification settings - Fork 420
destroy() receives initialize argument #2376
destroy() receives initialize argument #2376
Conversation
Thanks for your pull request and interest in making D better, @TurkeyMan! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
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
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + druntime#2376" |
757192b
to
7d1c072
Compare
7d1c072
to
ae62da5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing I'm slightly concerned with is destroy with static arrays with the explicit template tinsansiation, but I suppose that can't be helped.
@@ -0,0 +1,3 @@ | |||
Added `initialize` template argument to `object.destroy()`. | |||
|
|||
`object.destroy()` now receives an `initialize` argument to specify whether to re-initialize the object after destruction. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then perhaps call it reinitialize
(or maybe reinit_memory
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered reinitialize
, I decided against it. The other one feels unnecessarily wordy to me.
3rd opinions anyone?
ae62da5
to
d30020e
Compare
I' assuming this is unrelated. |
I presumed so... |
Hmm, that demangles as |
Hmm, https://github.com/dlang/druntime/blob/master/benchmark/runbench.d#L58 I don't see an explicit call to |
Static lib? Pre-compiled code? Left-over binary object that wasn't rebuild from fail dirty detection in CI step? I have audited every call to |
IDK, giving it another kick now. |
Nope still fails, thats just weird! SO mentions that
|
Please rebase |
d30020e
to
175977f
Compare
So rather unhelpfully in the case of a shared build it doesn't tell you what object references the symbol. Building it locally on OSX i get:
So, |
This is definitely a stale build or wrong lib problem I just |
(you'll need to give this a kick to revive the doc tester) |
Ahh, that'd be because $(ROOT)/benchmark: benchmark/runbench.d target $(DMD)
$(DMD) $(PHOBOS_DFLAGS) -de $< -of$@
benchmark: $(ROOT)/benchmark
$<
benchmark-compile-only: $(ROOT)/benchmark $(DMD)
DMD=$(DMD) $< --repeat=0 --dflags="$(PHOBOS_DFLAGS) -de"
|
While the build script definitely should be improved/fixed, Buildkite always initially builds the latest druntime + phobos version and thus the "global" version of Phobos on Buildkite should be equal to the PR's one. I will look into improving the build script, but in the meantime I think the Buildkite error might originate from it checking out |
Thanks! |
Hmm now that you mention it, the symbol that was missing was |
-> dlang/ci#344 |
175977f
to
d13b63a
Compare
@wilzbach apparently that didn't fix it. |
I'm aware and currently working on dlang/ci#351 |
I can't tell if that fixed that problem, now
|
Yet another attempt: dlang/ci#352 |
(Though of course as these Buildkite failures are unrelated this can be merged, this shouldn't block this PR) |
…ect!) destruction
d13b63a
to
0fe9872
Compare
Fixes Issue 19214 - Support object.destruct() for efficient (and correct!) destruction
Implement via template argument to
destroy
as discussed in #2292