tracking issue: remove Value& out parameters #1136
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
diagnostics
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
Importance
High
Importance
Low
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
Release Blocking
Non-urgent
Release Blocking
Urgent
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
Urgency
High
Urgency
Low
ux
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
mainhas pretty resonable support for returning values directly since pointer tagging happened. we should remove out parameters from all signatures and return proper values instead.getDerivationand numerous others probably
This issue was mentioned on Gerrit on the following CLs:
visitlambda to return a value")@sky1e Are you still working on this? I have a potential solution for
getDerivationand potentially others but don't want to steal your fire if you want to get this over the finish line.@ifreilicht wrote in #1136 (comment):
Maybe I'm missing something, but I don't see any
Value&out params in any of thegetDerivation(s)functions.https://git.lix.systems/lix-project/lix/src/branch/main/lix/libexpr/get-drvs.cc#L405-L410
This one forces
v, so it's using the provided value.https://git.lix.systems/lix-project/lix/src/branch/main/lix/libexpr/get-drvs.cc#L428-L435
This one calls the above with its
vparameter.https://git.lix.systems/lix-project/lix/src/branch/main/lix/libexpr/get-drvs.cc#L449-L454
This one evaluates its
vInas a function.https://git.lix.systems/lix-project/lix/src/branch/main/lix/libexpr/get-drvs.cc#L555-560
And this one calls the previous with its
v.I believe with https://gerrit.lix.systems/c/lix/+/5472 that will be all
Value&out parameters removed, though I wouldn't mind a second pair of eyes to check if I missed anything.Ah you're right, I didn't understand what
forceValuedoes, I'm still kinda new to the evaluator. That function does still has an out-param inDrvInfos & drvs, but not sure if that's something we also want to fix.That's the only other one I found as well. Wasn't sure if it could be removed. I believe I remember that
libexprwas supposed to have a public interface at some point and maybe that's part of it?