gristlabs_grist-core/sandbox
Alex Hall c5ebd7db3d (core) Add PEEK() function to bypass circular dependencies
Summary:
Adds a Python function `PEEK()` for use in formulas which temporarily sets a new attribute `Engine._peeking` which disables the `_use_node` method, preventing dependency tracking and allowing the given expression to use outdated values. This allows circumventing circular reference errors. It's particularly meant for trigger formulas although it works in normal formulas as well. The expression is wrapped in a `lambda` by `codebuilder` for lazy evaluation.

Discussion: https://grist.slack.com/archives/C0234CPPXPA/p1653571024031359

Test Plan: Added a Python unit test for circular trigger formulas using PEEK.

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3453
2022-06-02 19:50:14 +02:00
..
docker (core) support python3 in grist-core, and running engine via docker and/or gvisor 2021-07-28 09:02:32 -04:00
grist (core) Add PEEK() function to bypass circular dependencies 2022-06-02 19:50:14 +02:00
gvisor (core) add GVISOR_LIMIT_MEMORY to cap memory available in sandbox 2022-05-18 14:26:27 -04:00
gen_js_schema.py (core) Use GristObjCode in CellValue 2021-10-11 14:11:32 +02:00
install_tz.js (core) move data engine code to core 2020-07-29 08:57:25 -04:00
requirements3.txt (core) Switch excel import parsing from messytables+xlrd to openpyxl, and ignore empty rows 2022-05-12 14:43:21 +02:00
requirements.txt (core) Switch excel import parsing from messytables+xlrd to openpyxl, and ignore empty rows 2022-05-12 14:43:21 +02:00
run.sh (core) add machinery for self-managed flavor of Grist 2022-05-12 12:39:52 -04:00
watch.sh (core) add machinery for self-managed flavor of Grist 2022-05-12 12:39:52 -04:00