Extra strictness for constants #746
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
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
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 project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#746
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?
Is your feature request related to a problem? Please describe.
CppNix decided to adopt extra strictness for constants, usually, it can create some issues but here, the idea is to have:
be stricter in the
12constant, i.e. the result should be[ 12 ]instead of[ <thunked 12>].Describe the solution you'd like
Adopting this behavior.
Describe alternatives you've considered
Having a behavior difference here which is fine. It's only visible for people working on Nix implementations that tries to measure how lazy they are for correctness, e.g. Snix.
Additional context
cc @roberth @flokli
does this provide a performance advantage? otherwise nack. the evaluator is a garbage fire and changing user-invisible semantics to make test suites of other projects simpler is foolish at best.
Extra laziness for constantsto Extra strictness for constantsIt's not to accomodate the Snix test suite, see the commit message in https://cl.snix.dev/c/snix/+/30090. We updated our test (which tests something else) to not run into this corner case.
Robert mentioned that's probably the reason. Also see https://github.com/NixOS/nix/issues/12666.
This is marked as a release blocker to figure out or not if this has practical performance implications in the ecosystem.
@piegames would be a great test exercise for Flaker to run this over the ecosystem with this change and without to perform performance significance testing, it's not particularly urgent but can I tentatively delegate to you this item for 2.95.0?
Flaker still can't do any evaluation testing as of today, and getting it to that point is not ins scope for 2.95 where we'll focus on the current syntax deprecations.
Unless the strictness change has a significant performance impact or is really simple to implement, I'd like to put off such optimizations until we have a bytecode evaluator, where adding a constant propagation pass should be comparatively trivial