remove -Wno-deprecated-declarations
#744
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
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#744
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?
we currently build lix with
-Wno-deprecated-declarations
, but we'd like to turn that warning back on. right now this isn't feasible because we have a bunch of these warnings caused by our own declarations (which are rather easy to fix) and declarations from openssl, rapidcheck, and some other places. this should be easy to do, but there are many places that cause these warningsThis issue was mentioned on Gerrit on the following CLs:
I was looking into this a bit.. the warnings within our code mainly stem from use of the default
Value
constructor. There are many easy cases (esp in tests etc) but the main tricky case I noticed was the prevalence of eval-y functions (EvalState::eval
,NixRepl::evalString
,EvalState::callFunction
etc) writing the result to an out parameter passed by reference rather than returning it (by value).This means there's lots of calls like
Value v; state.evalFile(CanonPath(manifestFile), v);
orValue v2; state.autoCallFunction(*autoArgs, v1, v2);
. I'm not super clear on what the desired factoring of this would be.. all (or almost all?) of these functions seem to bevoid
-return functions currently, so one option might be to refactor them to return their result by value instead of with an out-parameter, but I'm not sure if there's performance reasons for avoiding that?I kinda already went ahead and tried that locally (just out of curiosity) with the functions where it's relevant for purposes of avoiding
Value
default constructors, and at least tests pass locally + some quick smoketests seem to work...having the Value-out-parameter functions return a value has indeed been tried in the past, but for reasons that were never investigated deeply we saw a noticable negative perf impact for that (
cl/1626
). having them return values would be awesome, but we really have to get the perf impact under controlWow, that's a bizarre perf regression. Was this on Clang, gcc or both?
don't remember. this was tested before we forbade building with gcc, so chances are high it happened on gcc
I took a stab at the perf regressions and took the liberty of forking it out into its own Forgejo issue: #792