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

[stdlib] Use ValueDestructorRecorder in test_inline_list.mojo #3094

Conversation

gabrieldemarmiesse
Copy link
Contributor

@gabrieldemarmiesse gabrieldemarmiesse commented Jun 21, 2024

This PR is a small piece of #2965 . I'm trying to make #2965 smaller to make it easier to work on.

In itself, this PR is a refactoring. The goal is to unify the "destructor counters" that are present in the unit tests and use only the one in stdlib/test/test_utils/types.mojo. The goal of those structs is to record the number of __del__ call being made to make sure the lifecycle of elements in a collection is correct. To make it usable with InlineList, I had to add the explicit copy constructor.

@ConnorGray since you already did a review of #2965

Signed-off-by: gabrieldemarmiesse <gabrieldemarmiesse@gmail.com>
@gabrieldemarmiesse gabrieldemarmiesse requested a review from a team as a code owner June 21, 2024 18:53
@ConnorGray
Copy link
Collaborator

!sync

@modularbot modularbot added the imported-internally Signals that a given pull request has been imported internally. label Jun 21, 2024
@modularbot
Copy link
Collaborator

✅🟣 This contribution has been merged 🟣✅

Your pull request has been merged to the internal upstream Mojo sources. It will be reflected here in the Mojo repository on the nightly branch during the next Mojo nightly release, typically within the next 24-48 hours.

We use Copybara to merge external contributions, click here to learn more.

@modularbot modularbot added the merged-internally Indicates that this pull request has been merged internally label Jun 24, 2024
modularbot pushed a commit that referenced this pull request Jun 25, 2024
…t.mojo` (#42108)

[External] [stdlib] Use `ValueDestructorRecorder` in
`test_inline_list.mojo`

This PR is a small piece of mojo#2965 . I'm trying to make mojo#2965 smaller to
make it easier to work on.

In itself, this PR is a refactoring. The goal is to unify the
"destructor counters" that are present in the unit tests and use only
the one in `stdlib/test/test_utils/types.mojo`. The goal of those
structs is to record the number of `__del__` call being made to make
sure the lifecycle of elements in a collection is correct. To make it
usable with `InlineList`, I had to add the explicit copy constructor.

Co-authored-by: Gabriel de Marmiesse <gabriel.demarmiesse@datadoghq.com>
Closes #3094
MODULAR_ORIG_COMMIT_REV_ID: 4ff2d0ea67c29b144b6c76d3fb0f8db93143e41a
@modularbot modularbot added the merged-externally Merged externally in public mojo repo label Jun 25, 2024
@modularbot
Copy link
Collaborator

Landed in 65c13cd! Thank you for your contribution 🎉

@modularbot modularbot closed this Jun 25, 2024
modularbot pushed a commit that referenced this pull request Sep 13, 2024
…t.mojo` (#42108)

[External] [stdlib] Use `ValueDestructorRecorder` in
`test_inline_list.mojo`

This PR is a small piece of mojo#2965 . I'm trying to make mojo#2965 smaller to
make it easier to work on.

In itself, this PR is a refactoring. The goal is to unify the
"destructor counters" that are present in the unit tests and use only
the one in `stdlib/test/test_utils/types.mojo`. The goal of those
structs is to record the number of `__del__` call being made to make
sure the lifecycle of elements in a collection is correct. To make it
usable with `InlineList`, I had to add the explicit copy constructor.

Co-authored-by: Gabriel de Marmiesse <gabriel.demarmiesse@datadoghq.com>
Closes #3094
MODULAR_ORIG_COMMIT_REV_ID: 4ff2d0ea67c29b144b6c76d3fb0f8db93143e41a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imported-internally Signals that a given pull request has been imported internally. merged-externally Merged externally in public mojo repo merged-internally Indicates that this pull request has been merged internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants