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

Re-introduce mkStringNoCopy #11551

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

edolstra
Copy link
Member

Motivation

In b70d22b mkStringNoCopy() was renamed to mkString(), but this is a bit risky since in code like

vStringRegular.mkString("regular");

we want to be sure that the right overload is picked. (This is especially problematic since the overload that takes an std::string_view does allocate.) So let's be explicit.

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

In b70d22b `mkStringNoCopy()` was renamed to
`mkString()`, but this is a bit risky since in code like

    vStringRegular.mkString("regular");

we want to be sure that the right overload is picked. (This is
especially problematic since the overload that takes an
`std::string_view` *does* allocate.)  So let's be explicit.
@Mic92
Copy link
Member

Mic92 commented Sep 19, 2024

Does this fix an actual bug as of now or is it just making things more explicit?

@edolstra
Copy link
Member Author

@Mic92 Just making things more explicit.

@Mic92
Copy link
Member

Mic92 commented Sep 19, 2024

Looking at the flake regression it seems that some things are broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants