pineforge-codegen 1.6.1rc1__tar.gz → 1.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/CHANGELOG.md +7 -7
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/CONTRIBUTING.md +1 -1
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/LEGAL.md +2 -2
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/LICENSE +3 -3
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/PKG-INFO +15 -14
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/README.md +11 -10
- pineforge_codegen-1.6.2/VERSION +1 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/docs/PUBLIC_CONTRACT.md +1 -1
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/helpers.py +21 -1
- pineforge_codegen-1.6.2/pineforge_codegen/cpp_allowlist.py +804 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pyproject.toml +3 -0
- pineforge_codegen-1.6.1rc1/VERSION +0 -1
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/.gitignore +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/docs/codegen-coverage-gaps.md +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/docs/pine-cap-activation.md +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/__init__.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/analyzer/__init__.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/analyzer/base.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/analyzer/call_handlers.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/analyzer/contracts.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/analyzer/diagnostics.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/analyzer/tables.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/analyzer/types.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/ast_nodes.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/block_locals.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/builtin_keywords.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/__init__.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/base.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/capabilities.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/checked_settings.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/collection_history.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/constant_fold.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/drawing.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/emit_top.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/helpers_syminfo.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/host_members.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/input.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/order_shapes.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/run_stops.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/security.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/session_market.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/ta.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/tables.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/tv_number_format.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/types.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/visit_call.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/visit_expr.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/codegen/visit_stmt.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/collection_history.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/diagnostic_codes.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/diagnostics_catalog.json +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/errors.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/external_requests.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/finite_ta_length.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/lexer.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/library_inline.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/library_modules.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/library_v5.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/limits.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/matrix_overloads.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/method_binding.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/parser.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/pine_libraries.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/pine_spelling.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/pragmas.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/request_discovery.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/request_feed_inventory.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/security_contexts.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/session_reads.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/signatures.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/support_checker.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/symbols.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/timeframe_token_cli.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/tokens.py +0 -0
- {pineforge_codegen-1.6.1rc1 → pineforge_codegen-1.6.2}/pineforge_codegen/tv_input_choices.py +0 -0
|
@@ -20,15 +20,15 @@ supported as exact pairs; on the 0.x line they are independent. See the
|
|
|
20
20
|
the release commit. A prerelease note describes changes since the preceding
|
|
21
21
|
prerelease or stable tag; the final stable note consolidates the series.
|
|
22
22
|
|
|
23
|
-
## 1.6.1 —
|
|
23
|
+
## 1.6.1 — 2026-10-18
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
unchanged. Codegen 1.6.1 is planned as the exact engine/codegen pair with
|
|
28
|
-
engine `v1.6.1`; the prerelease `1.6.1-rc.1` pairs with engine
|
|
25
|
+
A patch release of the exact engine/codegen pair, paired with engine `v1.6.1`
|
|
26
|
+
and dated 2026-10-18; the prerelease `1.6.1-rc.1` pairs with engine
|
|
29
27
|
`v1.6.1-rc.1`. This entry records what changed in this repository since 1.6.0,
|
|
30
|
-
and nothing else:
|
|
31
|
-
|
|
28
|
+
and nothing else: after
|
|
29
|
+
[#209](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/209) added
|
|
30
|
+
the 1.6.1 changelog entry for `v1.6.1-rc.1`, only the final release-note and
|
|
31
|
+
pairing documentation updates landed before `1.6.1`.
|
|
32
32
|
|
|
33
33
|
### Compatibility and migration
|
|
34
34
|
|
|
@@ -4,7 +4,7 @@ This is the source-available PineScript v6 to C++ translator. Read the
|
|
|
4
4
|
[license and contribution terms](LEGAL.md) before sending a material change.
|
|
5
5
|
Contributions use the Developer Certificate of Origin: add a `Signed-off-by`
|
|
6
6
|
line with `git commit -s`. Material contributions also require a Contributor
|
|
7
|
-
License Agreement so
|
|
7
|
+
License Agreement so PINEFORGE LLC can include them in its commercial licenses;
|
|
8
8
|
contact luis@4pass.com.tw before opening a material pull request.
|
|
9
9
|
|
|
10
10
|
## Local setup
|
|
@@ -19,7 +19,7 @@ The PineForge Source License 1.1 replaced 1.0, and 1.2 replaces 1.1, for the cod
|
|
|
19
19
|
|
|
20
20
|
## Copyright and licensor
|
|
21
21
|
|
|
22
|
-
The licensor is **
|
|
22
|
+
The licensor is **PINEFORGE LLC**, a Delaware limited liability company. It holds the copyright in `pineforge-codegen`; the founder's rights in the software are assigned to it. Commercial licenses are granted by PINEFORGE LLC.
|
|
23
23
|
|
|
24
24
|
## What this repository is
|
|
25
25
|
|
|
@@ -35,7 +35,7 @@ The transpiler has **no runtime dependencies** (`transpile()` and `transpile_ful
|
|
|
35
35
|
|
|
36
36
|
## Contributions
|
|
37
37
|
|
|
38
|
-
Contributions are accepted under a Developer Certificate of Origin (`Signed-off-by`). Because this project is **dual-licensed** (source-available + a sold commercial license), material contributions require a Contributor License Agreement granting
|
|
38
|
+
Contributions are accepted under a Developer Certificate of Origin (`Signed-off-by`). Because this project is **dual-licensed** (source-available + a sold commercial license), material contributions require a Contributor License Agreement granting PINEFORGE LLC the right to include the contribution in its commercial licenses; otherwise it cannot be accepted. See [CONTRIBUTING.md](CONTRIBUTING.md) (or contact luis@4pass.com.tw) before opening a material PR.
|
|
39
39
|
|
|
40
40
|
## No warranty
|
|
41
41
|
|
|
@@ -9,9 +9,9 @@ person's own account or capital. In the Commercial Use section, the
|
|
|
9
9
|
definition of investment capital now covers the capital in such an
|
|
10
10
|
account, real or simulated.
|
|
11
11
|
|
|
12
|
-
Copyright 2025-2026
|
|
12
|
+
Copyright 2025-2026 PINEFORGE LLC
|
|
13
13
|
|
|
14
|
-
Required Notice: Copyright 2025-2026
|
|
14
|
+
Required Notice: Copyright 2025-2026 PINEFORGE LLC (https://github.com/pineforge-4pass/pineforge-codegen-oss)
|
|
15
15
|
|
|
16
16
|
The software is free of charge for the permitted purposes below, including
|
|
17
17
|
Personal Trading. Commercial Use, defined below, needs a separate commercial
|
|
@@ -242,7 +242,7 @@ kind of legal claim.***
|
|
|
242
242
|
|
|
243
243
|
## Definitions
|
|
244
244
|
|
|
245
|
-
The **licensor** is
|
|
245
|
+
The **licensor** is PINEFORGE LLC, and the **software** is the software the
|
|
246
246
|
licensor makes available under these terms.
|
|
247
247
|
|
|
248
248
|
**You** refers to the individual or entity agreeing to these terms.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pineforge-codegen
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.2
|
|
4
4
|
Summary: PineScript v6 to C++ transpiler that targets the pineforge-engine runtime.
|
|
5
5
|
Project-URL: Homepage, https://github.com/pineforge-4pass/pineforge-codegen-oss
|
|
6
6
|
Project-URL: Issues, https://github.com/pineforge-4pass/pineforge-codegen-oss/issues
|
|
@@ -18,9 +18,9 @@ License: PineForge Source License 1.2
|
|
|
18
18
|
definition of investment capital now covers the capital in such an
|
|
19
19
|
account, real or simulated.
|
|
20
20
|
|
|
21
|
-
Copyright 2025-2026
|
|
21
|
+
Copyright 2025-2026 PINEFORGE LLC
|
|
22
22
|
|
|
23
|
-
Required Notice: Copyright 2025-2026
|
|
23
|
+
Required Notice: Copyright 2025-2026 PINEFORGE LLC (https://github.com/pineforge-4pass/pineforge-codegen-oss)
|
|
24
24
|
|
|
25
25
|
The software is free of charge for the permitted purposes below, including
|
|
26
26
|
Personal Trading. Commercial Use, defined below, needs a separate commercial
|
|
@@ -251,7 +251,7 @@ License: PineForge Source License 1.2
|
|
|
251
251
|
|
|
252
252
|
## Definitions
|
|
253
253
|
|
|
254
|
-
The **licensor** is
|
|
254
|
+
The **licensor** is PINEFORGE LLC, and the **software** is the software the
|
|
255
255
|
licensor makes available under these terms.
|
|
256
256
|
|
|
257
257
|
**You** refers to the individual or entity agreeing to these terms.
|
|
@@ -327,7 +327,7 @@ for the changes in each release from 1.0.0 on and the release-note policy.
|
|
|
327
327
|
## Releases and this README
|
|
328
328
|
|
|
329
329
|
<!-- Release lane: before a release is tagged, add it to the Engine pairing
|
|
330
|
-
table and update every line that names `1.6.
|
|
330
|
+
table and update every line that names `1.6.1` or `v1.6.1` as the current
|
|
331
331
|
release or pair (this section's version and date, the baseline paragraph at
|
|
332
332
|
the top, the engine `src/source/` link, the `@pf-trace` note, the clone
|
|
333
333
|
command and its example output, "This section describes …", the timing note)
|
|
@@ -337,7 +337,7 @@ hosted-server line name no version. -->
|
|
|
337
337
|
|
|
338
338
|
This README ships with each release as its package description on PyPI
|
|
339
339
|
(`pineforge-codegen`); releases from 0.7.0 on are also on npm as
|
|
340
|
-
`@pineforge/codegen-pyodide`. It describes 1.6.
|
|
340
|
+
`@pineforge/codegen-pyodide`. It describes 1.6.1 (2026-10-18)
|
|
341
341
|
and what changed since 0.10.4. The 1.4.0 release's behavior was validated
|
|
342
342
|
before tagging on codegen `bfc4ddce` with engine `b3192bfc`, excluding engine
|
|
343
343
|
request #356; those validation builds reported `1.3.0`. Historical measurements
|
|
@@ -410,8 +410,8 @@ It does **not** own execution semantics. Order lifecycle, bracket legs,
|
|
|
410
410
|
fill-price and slippage rules, `process_orders_on_close` / `calc_on_order_fills`,
|
|
411
411
|
margin revival and trail/stop behaviour — everything TradingView parity depends
|
|
412
412
|
on at run time — live in the engine's source-adapter runtime
|
|
413
|
-
([`src/source/`](https://github.com/pineforge-4pass/pineforge-engine/tree/v1.6.
|
|
414
|
-
in engine `v1.6.
|
|
413
|
+
([`src/source/`](https://github.com/pineforge-4pass/pineforge-engine/tree/v1.6.1/src/source)
|
|
414
|
+
in engine `v1.6.1`), which maps them onto the engine's Pine-agnostic kernel.
|
|
415
415
|
See
|
|
416
416
|
the engine's [architecture notes](https://github.com/pineforge-4pass/pineforge-engine#architecture-kernel-vs-parity).
|
|
417
417
|
|
|
@@ -826,6 +826,7 @@ Generated C++ compiles only against the engine it was generated for:
|
|
|
826
826
|
| 1.4.0 (PyPI, 2026-10-08) | `v1.4.0` | Adds paired coded failures, corrected input manifests and collection lowering. C ABI 4 does not authorize a mixed pair. Regenerate and relink. |
|
|
827
827
|
| 1.5.0 (PyPI, 2026-10-12) | `v1.5.0` | Adds the nonfatal `note` diagnostic severity and diagnostic `user_message` templates. Regenerate and relink. |
|
|
828
828
|
| 1.6.0 (PyPI, 2026-10-17) | `v1.6.0` | Emitted C++ and the Python, JSON and diagnostic contract are unchanged since 1.5.0; test and comment cleanup only (#200, #201, #202). Regenerate and relink. |
|
|
829
|
+
| 1.6.1 (PyPI, 2026-10-18) | `v1.6.1` | Fixes emitted C++ for calendar built-ins called with `timezone=` and no positional `time`, and for `var` array initializers over unary-signed or mixed numeric constants (#205); the Python, JSON and diagnostic contract are unchanged since 1.6.0. Regenerate and relink. |
|
|
829
830
|
| Later `X.Y.Z` releases | `vX.Y.Z` of the same version | See below. |
|
|
830
831
|
|
|
831
832
|
On the 0.x line the engine and codegen versions are independent, and the
|
|
@@ -851,8 +852,8 @@ Pine as `strategy.pine`, write `strategy.generated.cpp` with the
|
|
|
851
852
|
[file example](#transpile-a-file-to-a-cpp) above, then from the same directory:
|
|
852
853
|
|
|
853
854
|
```bash
|
|
854
|
-
# 1.6.
|
|
855
|
-
git clone --branch v1.6.
|
|
855
|
+
# 1.6.1 pairs with engine v1.6.1. For 0.10.4 use v0.13.1.
|
|
856
|
+
git clone --branch v1.6.1 https://github.com/pineforge-4pass/pineforge-engine.git
|
|
856
857
|
cd pineforge-engine
|
|
857
858
|
cp ../strategy.generated.cpp tutorial/macd/generated.cpp # the tutorial's strategy slot
|
|
858
859
|
bash tutorial/run.sh # needs cmake, a C++17 compiler and python3
|
|
@@ -930,7 +931,7 @@ use `python -m pytest --collect-only -q` for the current collection count.
|
|
|
930
931
|
## License
|
|
931
932
|
|
|
932
933
|
Source-available under the [PineForge Source License 1.2](https://github.com/pineforge-4pass/pineforge-codegen-oss/blob/main/LICENSE);
|
|
933
|
-
the `LICENSE` file is the controlling text. The licensor is
|
|
934
|
+
the `LICENSE` file is the controlling text. The licensor is PINEFORGE LLC.
|
|
934
935
|
|
|
935
936
|
- **Free for noncommercial use:** any noncommercial purpose, and use by a
|
|
936
937
|
charitable organization, educational institution, public research
|
|
@@ -978,7 +979,7 @@ quote. The commercial-license store (coming soon) will take orders online.
|
|
|
978
979
|
|
|
979
980
|
## Explicit Pine execution attachment
|
|
980
981
|
|
|
981
|
-
This section describes the 1.6.
|
|
982
|
+
This section describes the 1.6.1 and engine `v1.6.1` pair. The Pine execution adapter is
|
|
982
983
|
the engine's full Pine execution runtime (`PineExecutionAdapter` and
|
|
983
984
|
`PineStrategyHost` in the engine's `src/source/`): order lifecycle, bracket
|
|
984
985
|
legs, fill-price and slippage rules, POOC / `calc_on_order_fills`, margin
|
|
@@ -1001,9 +1002,9 @@ Regenerate old generated C++ before using a new engine for Pine execution. C++
|
|
|
1001
1002
|
generated before the source-layer cut
|
|
1002
1003
|
([#129](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/129)),
|
|
1003
1004
|
0.10.4's included, derives from `BacktestEngine` and does not compile against
|
|
1004
|
-
engine `v1.6.
|
|
1005
|
+
engine `v1.6.1`; old cap-only C++ does not attach the priority rule, and
|
|
1005
1006
|
metadata cannot silently restore it. Rebuild all modules against the
|
|
1006
|
-
new matching C++ layout (`engine_script_run_v19` in engine `v1.6.
|
|
1007
|
+
new matching C++ layout (`engine_script_run_v19` in engine `v1.6.1`). Retaining
|
|
1007
1008
|
that epoch does not promise equal fingerprints, state hashes or trades across
|
|
1008
1009
|
releases. The extraction preserves Pine policy
|
|
1009
1010
|
under explicit attachment; it does not implement the generic native
|
|
@@ -42,7 +42,7 @@ for the changes in each release from 1.0.0 on and the release-note policy.
|
|
|
42
42
|
## Releases and this README
|
|
43
43
|
|
|
44
44
|
<!-- Release lane: before a release is tagged, add it to the Engine pairing
|
|
45
|
-
table and update every line that names `1.6.
|
|
45
|
+
table and update every line that names `1.6.1` or `v1.6.1` as the current
|
|
46
46
|
release or pair (this section's version and date, the baseline paragraph at
|
|
47
47
|
the top, the engine `src/source/` link, the `@pf-trace` note, the clone
|
|
48
48
|
command and its example output, "This section describes …", the timing note)
|
|
@@ -52,7 +52,7 @@ hosted-server line name no version. -->
|
|
|
52
52
|
|
|
53
53
|
This README ships with each release as its package description on PyPI
|
|
54
54
|
(`pineforge-codegen`); releases from 0.7.0 on are also on npm as
|
|
55
|
-
`@pineforge/codegen-pyodide`. It describes 1.6.
|
|
55
|
+
`@pineforge/codegen-pyodide`. It describes 1.6.1 (2026-10-18)
|
|
56
56
|
and what changed since 0.10.4. The 1.4.0 release's behavior was validated
|
|
57
57
|
before tagging on codegen `bfc4ddce` with engine `b3192bfc`, excluding engine
|
|
58
58
|
request #356; those validation builds reported `1.3.0`. Historical measurements
|
|
@@ -125,8 +125,8 @@ It does **not** own execution semantics. Order lifecycle, bracket legs,
|
|
|
125
125
|
fill-price and slippage rules, `process_orders_on_close` / `calc_on_order_fills`,
|
|
126
126
|
margin revival and trail/stop behaviour — everything TradingView parity depends
|
|
127
127
|
on at run time — live in the engine's source-adapter runtime
|
|
128
|
-
([`src/source/`](https://github.com/pineforge-4pass/pineforge-engine/tree/v1.6.
|
|
129
|
-
in engine `v1.6.
|
|
128
|
+
([`src/source/`](https://github.com/pineforge-4pass/pineforge-engine/tree/v1.6.1/src/source)
|
|
129
|
+
in engine `v1.6.1`), which maps them onto the engine's Pine-agnostic kernel.
|
|
130
130
|
See
|
|
131
131
|
the engine's [architecture notes](https://github.com/pineforge-4pass/pineforge-engine#architecture-kernel-vs-parity).
|
|
132
132
|
|
|
@@ -541,6 +541,7 @@ Generated C++ compiles only against the engine it was generated for:
|
|
|
541
541
|
| 1.4.0 (PyPI, 2026-10-08) | `v1.4.0` | Adds paired coded failures, corrected input manifests and collection lowering. C ABI 4 does not authorize a mixed pair. Regenerate and relink. |
|
|
542
542
|
| 1.5.0 (PyPI, 2026-10-12) | `v1.5.0` | Adds the nonfatal `note` diagnostic severity and diagnostic `user_message` templates. Regenerate and relink. |
|
|
543
543
|
| 1.6.0 (PyPI, 2026-10-17) | `v1.6.0` | Emitted C++ and the Python, JSON and diagnostic contract are unchanged since 1.5.0; test and comment cleanup only (#200, #201, #202). Regenerate and relink. |
|
|
544
|
+
| 1.6.1 (PyPI, 2026-10-18) | `v1.6.1` | Fixes emitted C++ for calendar built-ins called with `timezone=` and no positional `time`, and for `var` array initializers over unary-signed or mixed numeric constants (#205); the Python, JSON and diagnostic contract are unchanged since 1.6.0. Regenerate and relink. |
|
|
544
545
|
| Later `X.Y.Z` releases | `vX.Y.Z` of the same version | See below. |
|
|
545
546
|
|
|
546
547
|
On the 0.x line the engine and codegen versions are independent, and the
|
|
@@ -566,8 +567,8 @@ Pine as `strategy.pine`, write `strategy.generated.cpp` with the
|
|
|
566
567
|
[file example](#transpile-a-file-to-a-cpp) above, then from the same directory:
|
|
567
568
|
|
|
568
569
|
```bash
|
|
569
|
-
# 1.6.
|
|
570
|
-
git clone --branch v1.6.
|
|
570
|
+
# 1.6.1 pairs with engine v1.6.1. For 0.10.4 use v0.13.1.
|
|
571
|
+
git clone --branch v1.6.1 https://github.com/pineforge-4pass/pineforge-engine.git
|
|
571
572
|
cd pineforge-engine
|
|
572
573
|
cp ../strategy.generated.cpp tutorial/macd/generated.cpp # the tutorial's strategy slot
|
|
573
574
|
bash tutorial/run.sh # needs cmake, a C++17 compiler and python3
|
|
@@ -645,7 +646,7 @@ use `python -m pytest --collect-only -q` for the current collection count.
|
|
|
645
646
|
## License
|
|
646
647
|
|
|
647
648
|
Source-available under the [PineForge Source License 1.2](https://github.com/pineforge-4pass/pineforge-codegen-oss/blob/main/LICENSE);
|
|
648
|
-
the `LICENSE` file is the controlling text. The licensor is
|
|
649
|
+
the `LICENSE` file is the controlling text. The licensor is PINEFORGE LLC.
|
|
649
650
|
|
|
650
651
|
- **Free for noncommercial use:** any noncommercial purpose, and use by a
|
|
651
652
|
charitable organization, educational institution, public research
|
|
@@ -693,7 +694,7 @@ quote. The commercial-license store (coming soon) will take orders online.
|
|
|
693
694
|
|
|
694
695
|
## Explicit Pine execution attachment
|
|
695
696
|
|
|
696
|
-
This section describes the 1.6.
|
|
697
|
+
This section describes the 1.6.1 and engine `v1.6.1` pair. The Pine execution adapter is
|
|
697
698
|
the engine's full Pine execution runtime (`PineExecutionAdapter` and
|
|
698
699
|
`PineStrategyHost` in the engine's `src/source/`): order lifecycle, bracket
|
|
699
700
|
legs, fill-price and slippage rules, POOC / `calc_on_order_fills`, margin
|
|
@@ -716,9 +717,9 @@ Regenerate old generated C++ before using a new engine for Pine execution. C++
|
|
|
716
717
|
generated before the source-layer cut
|
|
717
718
|
([#129](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/129)),
|
|
718
719
|
0.10.4's included, derives from `BacktestEngine` and does not compile against
|
|
719
|
-
engine `v1.6.
|
|
720
|
+
engine `v1.6.1`; old cap-only C++ does not attach the priority rule, and
|
|
720
721
|
metadata cannot silently restore it. Rebuild all modules against the
|
|
721
|
-
new matching C++ layout (`engine_script_run_v19` in engine `v1.6.
|
|
722
|
+
new matching C++ layout (`engine_script_run_v19` in engine `v1.6.1`). Retaining
|
|
722
723
|
that epoch does not promise equal fingerprints, state hashes or trades across
|
|
723
724
|
releases. The extraction preserves Pine policy
|
|
724
725
|
under explicit attachment; it does not implement the generic native
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.6.2
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Public contract for 1.0
|
|
2
2
|
|
|
3
3
|
The supported Python/JSON contract began in 1.0.0; the sections below identify
|
|
4
|
-
later additions. This revision includes the 1.6.
|
|
4
|
+
later additions. This revision includes the 1.6.1 pair (2026-10-18).
|
|
5
5
|
|
|
6
6
|
Text marked **since 1.5.0** describes diagnostic additions that 1.4.0 and
|
|
7
7
|
earlier releases do not have: the `note` severity, the `user_message` template
|
|
@@ -345,6 +345,25 @@ INLINE_HISTORY_KINDS = (
|
|
|
345
345
|
)
|
|
346
346
|
|
|
347
347
|
|
|
348
|
+
# Symbols the generated-C++ allowlist (``cpp_allowlist.py``) refuses when
|
|
349
|
+
# they appear bare. They are legal Pine identifiers (``free`` as in free
|
|
350
|
+
# margin, ``system``/``socket`` as ordinary words), so a script declaration
|
|
351
|
+
# of one must not reach the generated C++ as a bare libc name: the checker
|
|
352
|
+
# would refuse the TU, and the member would shadow the callee. Reserving
|
|
353
|
+
# them makes ``_safe_name`` emit ``pf_safe_<name>`` instead.
|
|
354
|
+
LIBC_RESERVED_NAMES = frozenset("""
|
|
355
|
+
__asm __asm__ _Pragma
|
|
356
|
+
system popen pclose fork vfork posix_spawn posix_spawnp syscall
|
|
357
|
+
mmap mprotect ptrace
|
|
358
|
+
exec execl execle execlp execv execve execvp execvpe execveat
|
|
359
|
+
dlopen dlsym dlclose
|
|
360
|
+
fopen freopen fdopen open openat
|
|
361
|
+
socket connect bind listen accept getaddrinfo
|
|
362
|
+
getenv setenv unsetenv tzset putenv secure_getenv __secure_getenv
|
|
363
|
+
filesystem fstream ifstream ofstream
|
|
364
|
+
malloc calloc realloc free memcpy memmove memset
|
|
365
|
+
""".split())
|
|
366
|
+
|
|
348
367
|
# HOST_MEMBER_NAMES (codegen/host_members.py, derived by
|
|
349
368
|
# scripts/gen_host_members.py from the emitter and the host header): the host
|
|
350
369
|
# members the generated class reads or writes unqualified. A script identifier
|
|
@@ -352,7 +371,8 @@ INLINE_HISTORY_KINDS = (
|
|
|
352
371
|
# close > open`` became the value of ``session.isfirstbar``).
|
|
353
372
|
CPP_RESERVED = set(
|
|
354
373
|
LEGACY_CPP_RESERVED | CPP_KEYWORDS | CPP_CONTEXTUAL |
|
|
355
|
-
CPP_STANDARD_MACROS | CPP_EMITTER_NAMES | HOST_MEMBER_NAMES
|
|
374
|
+
CPP_STANDARD_MACROS | CPP_EMITTER_NAMES | HOST_MEMBER_NAMES |
|
|
375
|
+
LIBC_RESERVED_NAMES
|
|
356
376
|
)
|
|
357
377
|
|
|
358
378
|
# Temporaries the emitter declares in the C++ it generates around a user's
|