-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Better-typed string context #4124
Comments
They're not intrinsically important but they avoid another allocation. |
@edolstra are you worried about indirection or just having multiple strings? I was thinking something like: // probably exists already
struct StorePathWithOutput {
StorePath path;
std::string output;
};
// is that what the `=` thing means?
struct Closure {
StorePath path;
};
typedef std::variant<StorePathWithOutput, Closure> StringCtxItem; so more strings with things split, but not more indirection since the variant is stored directly in the set. This seems fine to me? |
Currently contexts are stored in |
So we have a
Now we have them for:
So what exactly is worse about the second option?
Are you just worried about the constant factor space and time overhead of fine-grained allocations? |
I marked this as stale due to inactivity. → More info |
I closed this issue due to inactivity. → More info |
Since #6237 "deocoded" string contexts are better typed, but we should still do something about the interpreter heap original. |
The string context current is made up various patterns like
!out!/path/to/drv
and=/path/to/drv
. Are these encodings intrinsically important, or could we replace with astd::variant
?CC @edolstra
The text was updated successfully, but these errors were encountered: