about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/parser.y (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-05-19 r/4098 chore(3p/nix): unvendor tvix 0.1Vincent Ambo1-359/+0
Nothing is using this now, and we'll likely never pick this up again, but we learned a lot in the process. Every now and then this breaks in some bizarre way on channel bumps and it's just a waste of time to maintain that. Change-Id: Idcf2f5acd4ca7070ce18d7149cbfc0d967dc0a44 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5632 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Autosubmit: tazjin <tazjin@tvl.su>
2020-11-22 r/1906 feat(tvix): Add a pos field to more expr classesGriffin Smith1-5/+5
To aid in both debugging and (eventually) printing stacktraces, add a Pos member to a few more Expr variants. Change-Id: Ic1d2a056fc7e6c07bc3e79fa38845cb4a5da5ca5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2133 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
2020-08-14 r/1646 refactor(tvix): completely remove boehm gcKane York1-6/+1
We have decided that leaking memory is a better fate than random, non-debuggable memory corruption. Future CLs will begin changing various fields to std::unique_ptr and std::shared_ptr. It turns out that disabling the GC does not have disasterous impact. The Nix evaluator only runs on the client CLI, never in any long- running process. Even the REPL does not leak too badly under this change, because it uses one EvalState for the duration of the REPL. Building an explicitly tracing garbage collector is likely in the future of this project, but that giant amount of work cannot be done under a nix evaluator that is constantly crashing. We need to restore development velocity here, and this is the best way we've figured out to do it. Change-Id: I2fcda8fcee853c15a9a5e22eca7c5a784bc2bf76 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1720 Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
2020-08-10 r/1633 fix(3p/nix): inherit Expr from gc, make parser state traceableKane York1-22/+29
The parser contained vectors, and the primary parser state, that were not participating in GC tracing. Change-Id: Ie198592cd7acffd390e3e2ae9595138b56416838 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1706 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-19 r/1403 fix(3p/nix): Fix all remaining compiler warningsVincent Ambo1-1/+4
This compiles under `-Wall -Werror`. The largest chunk of this change is `final` qualifiers for the various Nix CLI command structs, which inherit from a Command class that has more virtual functions than are implemented by each command. Change-Id: I0925e6e1a39013f026773db5816e4a77d50f3b4a Reviewed-on: https://cl.tvl.fyi/c/depot/+/1294 Tested-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi> Reviewed-by: kanepyork <rikingcoding@gmail.com>
2020-07-19 r/1402 chore(3p/nix): Update deprecated 'pure-parser' settingVincent Ambo1-1/+1
This setting was renamed to api.pure about 300 years ago and caused warnings to be issued. Change-Id: If883b0667c3afe67ae3d2a9950a796688cfbea7a Reviewed-on: https://cl.tvl.fyi/c/depot/+/1290 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
2020-07-16 r/1323 refactor(3p/nix/libexpr): Move EvalState:* implementations out of parser.yVincent Ambo1-150/+15
Several definitions of functions declared in eval.hh were previously implemented in parser.y, this moves them over to parser.cc. While this still isn't a reasonable place to keep them, the long-term fix is more likely to be that eval.hh needs to be split up. Before we get to that point however, this already gives us the ability to use tooling with this code. Change-Id: If06fb655325fe281564047ffab0a0a640428a0ee Reviewed-on: https://cl.tvl.fyi/c/depot/+/1219 Tested-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-16 r/1322 refactor(3p/nix/libexpr): Extract static helpers out of parser.yVincent Ambo1-185/+5
Moves several of the static helper functions into a new parser.cc file. Once the rest of the code is usefully extracted, these will be moved to a private namespace. Change-Id: I0d7b53dcefe31bb5c6bad3ad7f5fcb48276bf799 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1218 Tested-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-16 r/1321 refactor(3p/nix/libexpr): Extract parser header out of Yacc fileVincent Ambo1-54/+1
First step (of many?) towards extracting all the inline code from the Yacc file and keeping it somewhere more accessible instead. Note that none of this code has previously been touched by a linter or formatter, pretty much ever, so as it is extracted it also undergoes similar changes to the whole codebase after the initial fork. Change-Id: If3b7181f22e3b3fd8c58dfa9befa7ee2896ea06d Reviewed-on: https://cl.tvl.fyi/c/depot/+/1217 Tested-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi>
2020-07-13 r/1280 refactor(3p/nix/libexpr): Remove the nix::Symbol default constructorVincent Ambo1-4/+5
Having a default constructor for this causes a variety of annoying situations across the codebase in which this is initialised to an unexpected value, leading to constant guarding against those conditions. It turns out there's actually no intrinsic reason that this default constructor needs to exist. The biggest one was addressed in CL/1138 and this commit cleans up the remaining bits. Change-Id: I4a847f50bc90e72f028598196592a7d8730a4e01 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1139 Reviewed-by: isomer <isomer@tvl.fyi> Tested-by: BuildkiteCI
2020-07-13 r/1278 refactor(3p/nix/libexpr): Make nix::AttrName a std::variantVincent Ambo1-20/+37
nix:AttrName was one of the few classes that relied on the default constructor of nix::Symbol (which I am trying to remove in a separate change). The class essentially represents the name of an attribute in a set, which is either just a string expression or a dynamically evaluated expression (e.g. string interpolation). Previously it would be constructed by only setting one of the fields and defaulting the other, now it is an explicit std::variant. Note that there are several code paths where not all eventualities are handled and this code is bug-for-bug compatible with those, except that unknown conditions (which should never work) are now throwing instead of silently doing ... something. The language tests pass with this change, and the depot derivations that I tested with evaluated successfully. Change-Id: Icf1ee60a5f8308f4ab18a82749e00cf37a938a8f Reviewed-on: https://cl.tvl.fyi/c/depot/+/1138 Reviewed-by: edef <edef@edef.eu> Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
2020-05-27 r/865 refactor(3p/nix): Anchor local includes at src/Vincent Ambo1-8/+8
Previously all includes were anchored in one global mess of header files. This moves the includes into filesystem "namespaces" (if you will) for each sub-package of Nix. Note: This commit does not introduce the relevant build system changes.
2020-05-24 r/840 style(3p/nix): Remove 'using std::*' from types.hhVincent Ambo1-19/+20
It is considered bad form to use things from includes in headers, as these directives propagate to everywhere else and can make it confusing. types.hh (which is includes almost literally everywhere) had some of these directives, which this commit removes.
2020-05-21 r/797 refactor(3p/nix/libexpr): Use std::string as qualified typeVincent Ambo1-9/+9
Replaces most uses of `string` with `std::string`. This came up because I removed the "types.hh" import from "symbol-table.hh", which percolated through a bunch of files where `string` was suddenly no longer defined ... *sigh*
2020-05-21 r/795 fix(3p/nix): Compatibility with updated SymbolTableVincent Ambo1-29/+29
The functions in SymbolTable have been renamed to match the Google Style guide, and some debug-only functions have been removed.
2020-05-19 r/771 style(3p/nix): Add braces around single-line conditionalsVincent Ambo1-10/+10
These were not caught by the previous clang-tidy invocation, but were instead sorted out using amber[0] as such: ambr --regex 'if (\(.+\))\s([a-z].*;)' 'if $1 { $2 }' [0]: https://github.com/dalance/amber
2020-05-19 r/758 refactor(3p/nix/libexpr): Replace logging.h with glogVincent Ambo1-10/+9
2020-05-17 r/724 Add 'third_party/nix/' from commit 'be66c7a6b24e3c3c6157fd37b86c7203d14acf10'Vincent Ambo1-0/+704
git-subtree-dir: third_party/nix git-subtree-mainline: cf8cd640c1adf74a3706efbcb0ea4625da106fb2 git-subtree-split: be66c7a6b24e3c3c6157fd37b86c7203d14acf10