about summary refs log tree commit diff
path: root/tvix (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2022-09-15 r/4859 fix(tvix/eval): thunk string interpolationsterni3-18/+40
If we have multiple string parts, we need to thunk assembling the string. If we have a single literal, it is strict (like all literals), but a single interpolation part may compile to a thunk, depending on how the expression inside is compiled – we can avoid forcing to early here compared to the previous behavior. Note that this CL retains the bug that `"${x}"` is erroneously translated to `x`, implying e.g. `"${12}" == 12`. The use of `parts.len()` is unproblematic, since normalized_parts() builds a `Vec` instead of returning an iterator. Change-Id: I3aecbfefef65cc627b1b8a65be27cbaeada3582b Reviewed-on: https://cl.tvl.fyi/c/depot/+/6580 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-15 r/4858 fix(web/tvl): sort blog posts by publishing dateVincent Ambo1-1/+1
... in reverse order (i.e., newer posts listed first) Change-Id: I126f9943bb53cf220b22e856318246bced90f1ec Reviewed-on: https://cl.tvl.fyi/c/depot/+/6583 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-15 r/4857 feat(tvix/eval): implement correct toString behaviorsterni6-14/+196
Implement C++ Nix's `EvalState::coerceToString` minus some of the Path / store handling. This is currently only used for `toString` which does all possible coercions, but we've already prepared the weaker coercion variant which is e.g. used for builtins that expect string arguments. `EvalState::coerceToPath` is still missing for builtins that need a path, but it'll be easy to build on top of this. Change-Id: I78d15576b18921791d04b6b1e964b951fdef22c6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6571 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-15 r/4856 feat(.envrc): gcroot third_party.sourcessterni3-2/+17
This is a bit slower than I'd like, but acceptable. Change-Id: I419b3c49201540de9d0ade1c6c2ac97758d8a811 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6576 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-09-14 r/4855 chore(3p/sources): Bump channels & overlayssterni2-14/+12
* //users/wpcarro/emacs: rls was removed from nixpkgs and is hopefully no longer necessary in this emacs setup. Change-Id: Ib8371da652c434e74eb67a2030b212a6423a1891 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6577 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-09-14 r/4854 fix(web/tvl): minor typo fixVincent Ambo1-1/+1
Think I introduced this while reformatting ... Change-Id: Id874f4832ebe2fb2a6aa997ab23fee2775e2bbf7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6579 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-14 r/4853 style(web/tvl): change background colour of <code> tagsVincent Ambo1-0/+4
These otherwise look the same as the rest of a post, which is a bit confusing. Change-Id: I66ac7256fa379b9f9510de1e2b236c7206219d27 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6561 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-09-14 r/4852 feat(web/tvl): publish tvix-status-september-22 blog postVincent Ambo1-1/+0
Change-Id: I161b1585bd04ad43fb3e320fd0277c7ed64547f9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6578 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su>
2022-09-14 r/4851 docs(web/tvl): professional editing pass on Tvix status updateVincent Ambo1-97/+100
Thanks to Danny Sichel for helping us out with this! Change-Id: I95416d824fcf0e43316e4c0c014c210aeea3c18d Reviewed-on: https://cl.tvl.fyi/c/depot/+/6575 Tested-by: BuildkiteCI Reviewed-by: eta <tvl@eta.st>
2022-09-14 r/4850 docs(web/tvl): rewrite blog post to be more "milestoney"Vincent Ambo1-20/+27
Suggested by zimbatm. Change-Id: I5979cf820943dd44c8a759f226b340c37f9b0446 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6572 Tested-by: BuildkiteCI Reviewed-by: eta <tvl@eta.st>
2022-09-13 r/4849 fix(tvix/eval): force left argument of `?` before checking for attrssterni3-0/+29
OpAttrsIsSet and OpAttrsTrySelect will fail silently if the attribute set value on the stack is actually a thunk, so we need to make sure to force at every step of the way. Emitting the force instructions in the compiler because it is easier to add, but maybe the VM should do this when handling the relevant opcodes? Comments welcome. Change-Id: I65c5ef348d59b2d07c9bb06abb24f9f3e6a0fdb2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6540 Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-09-13 r/4848 fix(tvix/eval): force value in builtins.typeOfsterni3-2/+27
This prevents Nix programs to observe the "internal" type of thunks. Possibly .type_of() is also an area of the runtime where we should panic if "internal" would ever be returned. Change-Id: I9f358044c48ad64896fb6a1b1a42f00a29efac00 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6539 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-13 r/4847 fix(tvix/eval): force exprs inside string interpolationsterni1-1/+5
The expression inside ${…} may return arbitrary values, including thunks, so we need to make sure to force them just in case. Change-Id: Ic11ba00c4c92a10a83becd91233db5f57f6e59c8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6541 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-09-13 r/4846 refactor(tvix/eval): cover all Value variants in force_for_outputVincent Ambo1-1/+8
Avoids accidentally dropping one on the floor if we add more, pointed out by sterni in cl/6372 Change-Id: Ib7bb0ce9c8331c8337003d20c4d5240dfae1c32a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6570 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-13 r/4845 fix(tvix/eval): add branch for directly comparing two thunksVincent Ambo1-0/+1
Pointed out by sterni in cl/6370 Change-Id: I324d8049a2702ced8f30ad43a64d63ae79dd0eab Reviewed-on: https://cl.tvl.fyi/c/depot/+/6569 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-13 r/4844 fix(tvix/eval): use fragment span for OpAttrsSelectVincent Ambo1-2/+2
Pointed out by sterni in cl/6389 Change-Id: I648056a760266a8cfd7adcdc478c7ff2132991f7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6568 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-13 r/4843 refactor(tvix/eval): point `OpPushWith` span at namespaceVincent Ambo1-1/+1
Pointed out by sterni in cl/6395 Change-Id: I2dda2bb11fef702df05fd7a4fd93b9e717a85dad Reviewed-on: https://cl.tvl.fyi/c/depot/+/6567 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-13 r/4842 refactor(tvix/eval): point `OpAssert` span at conditionVincent Ambo1-1/+1
This is more useful than pointing it at the entire assert expression, as that includes the body as well which is not going to be relevant in the error. Pointed out by sterni in cl/6391 Change-Id: I95a5d1edf90df65e7fa53d4d04502afd6e99e89a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6566 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-13 r/4841 chore(tvix/eval): do not inherit scope depth in new scopesVincent Ambo1-1/+0
This is no longer required, resolution is now more sane. Pointed out by sterni in cl/6422. Change-Id: Icc8983c648f864e66813948df6e2d4bad6a7f312 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6565 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-13 r/4840 refactor(tvix/eval): encapsulate scope_depth in compiler::scopeVincent Ambo3-15/+20
This field no longer needs to be directly accessible by the compiler. Addresses a sterni lint from cl/6466 Change-Id: I5e6791943d7f0ab3d9b7a30bb1654c4a6a435b1f Reviewed-on: https://cl.tvl.fyi/c/depot/+/6564 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-13 r/4839 fix(tvix/eval): address current clippy lintsVincent Ambo2-6/+6
Change-Id: I5288849d0e93511b0b5664fa92f1c6882e4a1356 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6563 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-13 r/4838 refactor(tvix/eval): use CodeIdx wrapper for instruction pointerVincent Ambo3-9/+34
As suggested by sterni in cl/6453. Change-Id: I3cf80d97c11fd7d085ab510f6be4b5f937c791ec Reviewed-on: https://cl.tvl.fyi/c/depot/+/6562 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-13 r/4837 feat(corp/tvixbolt): use fancy error formattingVincent Ambo1-5/+8
Change-Id: I633154f3a2ae2b1789992a1137c944e897c56b2c Reviewed-on: https://cl.tvl.fyi/c/depot/+/6535 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-09-13 r/4836 feat(tvix/eval): implement initial fancy formatting for errorsVincent Ambo3-27/+145
This very closely follows the way it's done for warnings, but errors have a lot more information available in some cases which we do not surface yet. Note also that due to requiring the `CodeMap`, this is not yet called from eval.rs as the way that is threaded through needs to be refactored, so only the method for reporting these errors as strings is implemented so far. Next steps for this will be to add a generic diagnostics module that reduces some of the boilerplate for this between warnings & errors, and which will also give us a good point in the future to switch to a fancier diagnostics crate. Change-Id: If6bb209f8e7a568d866e516a90335b9b2afbf66d Reviewed-on: https://cl.tvl.fyi/c/depot/+/6534 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-09-13 r/4835 feat(web/blog): add ability to specify post authorVincent Ambo3-0/+6
Anyone is free to pen a post for tvl.fyi if they want, so being able to attribute the author might be useful. This wasn't originally a feature because I wrote //web/blog only for tazj.in initially. Change-Id: Ibc50b53f92113a82a53ce40bb5defa18e926cc10 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6560 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi>
2022-09-13 r/4834 feat(corp/tvixbolt): add an ad in the footerVincent Ambo2-0/+25
As previously mentioned on IRC, this is why tvixbolt is under //corp. The majority of people in our community probably block ads anyways, but might as well ... The ad account is linked to the TVL legal entity. The ad is configured not to use any personalised data. In testing it's showing me lamps and shoes. This is the same kind of ad as on my grammar page, predlozhnik.ru Change-Id: I172881ed5d5ceb1fdeb2298b8f822d0c2a6518a8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6558 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-13 r/4833 docs(web/tvl): small updates & fixes to September '22 Tvix statusVincent Ambo1-4/+9
Change-Id: I2cf57abb0f8c21c3893e68ce2c6fb92a2c0d3ee6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6559 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-13 r/4832 docs(web/tvl): add draft for Tvix status update postVincent Ambo2-0/+158
This adds an initial version of the post which we can play with for further layouting. The post is marked as `draft`, so it will become available at the direct link, but have a banner on it telling people not to share it yet. Change-Id: Idac69e56bee027c2b566f50ef123b54aff6ebc3e Reviewed-on: https://cl.tvl.fyi/c/depot/+/6538 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2022-09-13 r/4831 feat(corp/tvixbolt): use fancy warning formattingVincent Ambo1-5/+3
Unfortunately the codemap-diagnostic crate doesn't provide a way to get colour control characters written to an arbitrary writer, so this is black & white only, but we can look at this later if we introduce something even fancier. For now it's reasonable. Change-Id: I1c7655cc4b254f77768b5931bc95fa13b3bd7e12 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6533 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-09-13 r/4830 feat(tvix/eval): implement initial fancy display for warningsVincent Ambo3-9/+94
This implements an initial fancy display for warnings emitted by the tvix compiler, using the codemap_diagnostic crate. Each warning variant has an associated message, and optionally an associated annotation for the span displayed to the user. In theory we could get a lot more fancy with the display for specific variants if needed (e.g. re-parse the AST and actually add multiple semantic spans based on context), but this is already a good start. Example: tvix-repl> let toString = https://tvl.fyi; in let inherit toString; in ({}: 42) rec {} warning[W004]: declared variable 'toString' shadows a built-in global! --> [tvix-repl]:1:5 | 1 | let toString = https://tvl.fyi; in let inherit toString; in ({}: 42) rec {} | ^^^^^^^^ variable declared here warning[W001]: URL literal syntax is deprecated, use a quoted string instead --> [tvix-repl]:1:16 | 1 | let toString = https://tvl.fyi; in let inherit toString; in ({}: 42) rec {} | ^^^^^^^^^^^^^^^ warning[W002]: inherited variable already exists with the same value --> [tvix-repl]:1:40 | 1 | let toString = https://tvl.fyi; in let inherit toString; in ({}: 42) rec {} | ^^^^^^^^^^^^^^^^^ warning[W999]: feature not yet implemented in tvix: recursive attribute sets --> [tvix-repl]:1:70 | 1 | let toString = https://tvl.fyi; in let inherit toString; in ({}: 42) rec {} | ^^^^^^ warning[W999]: feature not yet implemented in tvix: closed formals --> [tvix-repl]:1:62 | 1 | let toString = https://tvl.fyi; in let inherit toString; in ({}: 42) rec {} | ^^ warning[W003]: variable 'toString' is declared, but never used: --> [tvix-repl]:1:5 | 1 | let toString = https://tvl.fyi; in let inherit toString; in ({}: 42) rec {} | ^^^^^^^^ variable declared here => 42 :: int These are coloured when output to a terminal. Change-Id: If315648a07e333895db4ae1d0915ee2013806585 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6532 Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-09-13 r/4829 feat(ops/modules): deploy tvixbolt to tvixbolt.tvl.suVincent Ambo3-0/+27
Change-Id: I534cf918fc3e03ce8c14cf15f6d3280b6a657c8d Reviewed-on: https://cl.tvl.fyi/c/depot/+/6536 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-13 r/4828 feat(ops/glesys): add CNAME for tvixbolt.tvl.suVincent Ambo1-0/+11
I could not get nginx to serve it from `tvl.su/tvixbolt`, and ran out of interest in trying to fix it, so lets put it on a subdomain instead. Change-Id: I1313d75cc9831d94a894191376534b1e5186a76a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6537 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-13 r/4827 chore(tvix/eval): add dependency on codemap-diagnosticVincent Ambo3-0/+72
This is a crate for source-span based error reporting. Since all of our spans are already codemap spans, it is a good starting point. We have to figure out quite a bit of logic for neat error printing; later on if we want fancier presentation we might want to look at one of the other libraries in this space like miette. Change-Id: I4e28886af1ed199b7112d9dbf063c9f29b612bf1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6531 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: grfn <grfn@gws.fyi>
2022-09-12 r/4826 feat(wpcarro/ssh): Support iPhone SSH keyWilliam Carroll3-12/+18
For termius access Change-Id: Ic91b80bfc8deb816b5a7634ca5e74bb026729067 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6542 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-09-12 r/4825 feat(wpcarro/ava): Enable printingWilliam Carroll1-0/+5
Gotta print stuffs at the office (every decade or so) Change-Id: I3241b7a86eead50cadf785bb0204c803e40ac360 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6543 Reviewed-by: wpcarro <wpcarro@gmail.com> Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI
2022-09-11 r/4824 chore(tvix/eval): address current clippy lintsVincent Ambo1-2/+1
Change-Id: I76326c20a525044e89d3cd1392a29faa3414ca04 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6529 Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-11 r/4823 refactor(tvix/eval): remove `todo!()` calls in compilerVincent Ambo4-5/+29
It is impossible for tvixbolt to recover from panics, so the user experience of typing an expression using an unsupported feature was that it would get sad and stop responding to input. Instead, raise a normal value-level error of a new variant and continue where possible. Change-Id: Ibe016c92cacb87b85095c0f83758eddc6468053e Reviewed-on: https://cl.tvl.fyi/c/depot/+/6528 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-11 r/4822 fix(tazjin/emacs): globally unbind `C-x s`Vincent Ambo1-0/+4
This shortcut is so unbelievably annoying on some keyboards. Change-Id: I5c96d490fd42aa8422fa48be87079b60af81fcd3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6527 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-11 r/4821 docs(tvix/eval): propose builtin "inlining" optimisationsterni1-0/+18
Change-Id: I96a187792a1fd48cffd6b56ec22347aee8cae3af Reviewed-on: https://cl.tvl.fyi/c/depot/+/6526 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-11 r/4820 docs(tvix/eval): mention `?` and `or` for builtins optimisationsterni1-1/+3
Change-Id: Ifaa6da345d408a69ce46d6a0e7483352715c75bd Reviewed-on: https://cl.tvl.fyi/c/depot/+/6525 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-11 r/4819 docs(tvix/eval): remove the note on the private repoVincent Ambo1-8/+6
... because we are basically caught up now! Change-Id: Icdc06ff7ca5729c21301f009e94acfcd0f80879a Reviewed-on: https://cl.tvl.fyi/c/depot/+/6503 Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
2022-09-11 r/4818 docs(tvix/eval): add some notes on cloning & building tvix-evalVincent Ambo1-0/+23
Change-Id: I8cc359952b41994c2ba8bcfb8b0b6fc629bb81ea Reviewed-on: https://cl.tvl.fyi/c/depot/+/6502 Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2022-09-11 r/4817 chore(3p): gerrit: 3.4.0 -> 3.6.1Luke Granger-Brown12-282/+125
This change cannot be deployed OOTB: you must upgrade by 3.5.2+ first, and run copy-approvals. Change-Id: Ia2e49da4d801a21a3db59e2d5b054eeb46d7dc79 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6505 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-09-11 r/4816 chore(tvix/nix_cli): build with testsFlorian Klink3-2/+5
only run test_nix_store_add() when the feature integration_tests is enabled. Change-Id: I600f08ecaefe1ce77651ae07a58d7987107ab969 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6084 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2022-09-11 r/4815 chore(corp/tvixbolt): check in generated Cargo.lock changeVincent Ambo1-0/+1
Change-Id: I9f87ced716a4328b24fd8fa2eec077ce8dc4a7db Reviewed-on: https://cl.tvl.fyi/c/depot/+/6504 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: tazjin <tazjin@tvl.su>
2022-09-11 r/4814 fix(tvix/eval): pass correct slot when compiling attr valuesVincent Ambo1-1/+1
Change-Id: I90722d59dea4c7694eb5a7cf505db31196ba6c6c Reviewed-on: https://cl.tvl.fyi/c/depot/+/6501 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-11 r/4813 fix(tvix/eval): reduce scope depth in scope moduleVincent Ambo2-2/+2
Change-Id: If32f9e4c9212f20a39baa15d479ff1387c17570d Reviewed-on: https://cl.tvl.fyi/c/depot/+/6500 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-11 r/4812 feat(tvix/eval): add Chunk::pop_op methodVincent Ambo1-0/+22
This is used to drop an already emitted operation from a chunk again and clean up its span tracking. This is required in cases where the compiler has to backtrack. Change-Id: I8112da9427688bb2dec96a2ddd12390f6e9734c3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6499 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-11 r/4811 refactor(tvix/eval): refactor methods for parsing static identsVincent Ambo1-22/+39
Refactors the methods used for determining whether an identifier in a binding (i.e. an `rnix::Attr` node) is a static string, and extracting it. Previously all uses of this logic were for `let`-expressions, where dynamic attributes are always an error. However, we need the same logic to properly implement the phase separation of attribute set compilation. To facilitate this, the actual core logic of these methods now return `Option`, and are only converted to errors in cases where the errors are actually required. Change-Id: Iad7826eff2cb428182521c6f92276310edeae1eb Reviewed-on: https://cl.tvl.fyi/c/depot/+/6498 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
2022-09-11 r/4810 refactor(tvix/eval): move attrset-related code to compiler::attrsVincent Ambo2-202/+209
There's about to be a lot more code for attrsets (hopefully temporarily as part of an expand&contract cycle), while nested attribute logic is being refactored in preparation for recursive attribute sets. This does not change any functionality. Change-Id: I667565cd810ca7d9046120d1721c2ceb9095550b Reviewed-on: https://cl.tvl.fyi/c/depot/+/6497 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>