pineforge-codegen 1.6.0rc1__tar.gz → 1.6.1rc1__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.0rc1 → pineforge_codegen-1.6.1rc1}/CHANGELOG.md +57 -8
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/PKG-INFO +11 -10
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/README.md +10 -9
- pineforge_codegen-1.6.1rc1/VERSION +1 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/docs/PUBLIC_CONTRACT.md +1 -1
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/types.py +21 -1
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/types.py +51 -6
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/visit_call.py +13 -6
- pineforge_codegen-1.6.0rc1/VERSION +0 -1
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/.gitignore +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/CONTRIBUTING.md +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/LEGAL.md +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/LICENSE +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/docs/codegen-coverage-gaps.md +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/docs/pine-cap-activation.md +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/__init__.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/__init__.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/base.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/call_handlers.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/contracts.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/diagnostics.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/tables.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/ast_nodes.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/block_locals.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/builtin_keywords.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/__init__.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/base.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/capabilities.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/checked_settings.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/collection_history.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/constant_fold.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/drawing.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/emit_top.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/helpers.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/helpers_syminfo.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/host_members.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/input.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/order_shapes.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/run_stops.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/security.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/session_market.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/ta.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/tables.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/tv_number_format.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/visit_expr.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/visit_stmt.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/collection_history.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/diagnostic_codes.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/diagnostics_catalog.json +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/errors.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/external_requests.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/finite_ta_length.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/lexer.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/library_inline.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/library_modules.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/library_v5.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/limits.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/matrix_overloads.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/method_binding.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/parser.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/pine_libraries.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/pine_spelling.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/pragmas.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/request_discovery.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/request_feed_inventory.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/security_contexts.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/session_reads.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/signatures.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/support_checker.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/symbols.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/timeframe_token_cli.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/tokens.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/tv_input_choices.py +0 -0
- {pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pyproject.toml +0 -0
|
@@ -20,14 +20,63 @@ 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.
|
|
24
|
-
|
|
25
|
-
The planned number of the next release
|
|
26
|
-
exists, and the package version is
|
|
27
|
-
exact engine/codegen pair with
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
final text are set when
|
|
23
|
+
## 1.6.1 — Unreleased
|
|
24
|
+
|
|
25
|
+
The planned number of the next patch release of the exact engine/codegen pair;
|
|
26
|
+
it stays **Unreleased** until its tag exists, and the package version is
|
|
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
|
|
29
|
+
`v1.6.1-rc.1`. This entry records what changed in this repository since 1.6.0,
|
|
30
|
+
and nothing else: the engine pairing, the date and the final text are set when
|
|
31
|
+
the release is prepared.
|
|
32
|
+
|
|
33
|
+
### Compatibility and migration
|
|
34
|
+
|
|
35
|
+
- No Python, JSON, diagnostic or C ABI contract changes.
|
|
36
|
+
- Strategies that previously failed native C++ compilation when calling a
|
|
37
|
+
calendar built-in (`hour`, `minute`, `second`, `dayofmonth`, `dayofweek`,
|
|
38
|
+
`month`, `year`, `weekofyear`) with `timezone=` and no positional `time`
|
|
39
|
+
argument, or when initializing a `var` array with `array.from(...)` over
|
|
40
|
+
unary-signed or mixed numeric constants, now emit matching C++ types and
|
|
41
|
+
compile cleanly.
|
|
42
|
+
- A pair change requires regenerated C++ and relinked strategy libraries against
|
|
43
|
+
the paired engine release's headers and `libpineforge.a` (README
|
|
44
|
+
[Engine pairing](README.md#engine-pairing)).
|
|
45
|
+
|
|
46
|
+
### Changes since 1.6.0
|
|
47
|
+
|
|
48
|
+
- Bind the omitted `time` argument of calendar built-ins (`hour`, `minute`,
|
|
49
|
+
`second`, `dayofmonth`, `dayofweek`, `month`, `year`, `weekofyear`) to the
|
|
50
|
+
active bar's timestamp (`current_bar_.timestamp` on the chart, `bar.timestamp`
|
|
51
|
+
inside `request.security`) when called with a `timezone=` keyword argument
|
|
52
|
+
only
|
|
53
|
+
([#205](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/205)).
|
|
54
|
+
- Infer a single consistent element type across every `array.from(...)` call
|
|
55
|
+
(`var` array declarations, plain declarations and inline arguments alike) in
|
|
56
|
+
`pineforge_codegen/codegen/types.py` and `pineforge_codegen/analyzer/types.py`,
|
|
57
|
+
preserving `int` for integer constants (including unary-signed constants and
|
|
58
|
+
function-local constants) and promoting to `double` when any element is
|
|
59
|
+
`float`. For previously compiling scripts, the observable emitted-C++ change
|
|
60
|
+
is that an `array.from` whose arguments are all integer, including
|
|
61
|
+
unary-signed ones like `array.from(-1, 1)`, now emits `std::vector<int>`
|
|
62
|
+
instead of `std::vector<double>`; with `na` mixed in (`array.from(-1, na)`) it
|
|
63
|
+
emits `int` with the `int` `na` sentinel, as `array.from(1, na)` already did.
|
|
64
|
+
Values are unchanged for arithmetic, since `/`, `%`, `math.max` and the array
|
|
65
|
+
reductions already work in `double`
|
|
66
|
+
([#205](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/205)).
|
|
67
|
+
- Group weekly Dependabot pull requests into one pull request per ecosystem
|
|
68
|
+
(`npm` and `pip`) in `.github/dependabot.yml`
|
|
69
|
+
([#206](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/206)).
|
|
70
|
+
|
|
71
|
+
## 1.6.0 — 2026-10-17
|
|
72
|
+
|
|
73
|
+
A minor release of the exact engine/codegen pair, paired with engine `v1.6.0`
|
|
74
|
+
and dated 2026-10-17; the prerelease `1.6.0-rc.1` pairs with engine
|
|
75
|
+
`v1.6.0-rc.1`. This entry records what changed in this repository since 1.5.0,
|
|
76
|
+
and nothing else: after
|
|
77
|
+
[#203](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/203) added
|
|
78
|
+
the 1.6.0 changelog entry for `v1.6.0-rc.1`, only the final release-note and
|
|
79
|
+
pairing documentation updates landed before `1.6.0`.
|
|
31
80
|
|
|
32
81
|
### Compatibility and migration
|
|
33
82
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pineforge-codegen
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.1-rc.1
|
|
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
|
|
@@ -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.
|
|
330
|
+
table and update every line that names `1.6.0` or `v1.6.0` 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.
|
|
340
|
+
`@pineforge/codegen-pyodide`. It describes 1.6.0 (2026-10-17)
|
|
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.
|
|
414
|
-
in engine `v1.
|
|
413
|
+
([`src/source/`](https://github.com/pineforge-4pass/pineforge-engine/tree/v1.6.0/src/source)
|
|
414
|
+
in engine `v1.6.0`), 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
|
|
|
@@ -825,6 +825,7 @@ Generated C++ compiles only against the engine it was generated for:
|
|
|
825
825
|
| 1.3.0 (PyPI, 2026-10-06) | `v1.3.0` | The pair the `pineforge-release` image `1.3.0` ships. Its C++ adds the confirmed-bar receipt, which engine `v1.3.0`'s live runner reads, and the order-shapes receipt; engine `v1.3.0`'s `<pineforge/pineforge.h>` is `v1.2.0`'s. Regenerate and relink. |
|
|
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
|
+
| 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. |
|
|
828
829
|
| Later `X.Y.Z` releases | `vX.Y.Z` of the same version | See below. |
|
|
829
830
|
|
|
830
831
|
On the 0.x line the engine and codegen versions are independent, and the
|
|
@@ -850,8 +851,8 @@ Pine as `strategy.pine`, write `strategy.generated.cpp` with the
|
|
|
850
851
|
[file example](#transpile-a-file-to-a-cpp) above, then from the same directory:
|
|
851
852
|
|
|
852
853
|
```bash
|
|
853
|
-
# 1.
|
|
854
|
-
git clone --branch v1.
|
|
854
|
+
# 1.6.0 pairs with engine v1.6.0. For 0.10.4 use v0.13.1.
|
|
855
|
+
git clone --branch v1.6.0 https://github.com/pineforge-4pass/pineforge-engine.git
|
|
855
856
|
cd pineforge-engine
|
|
856
857
|
cp ../strategy.generated.cpp tutorial/macd/generated.cpp # the tutorial's strategy slot
|
|
857
858
|
bash tutorial/run.sh # needs cmake, a C++17 compiler and python3
|
|
@@ -977,7 +978,7 @@ quote. The commercial-license store (coming soon) will take orders online.
|
|
|
977
978
|
|
|
978
979
|
## Explicit Pine execution attachment
|
|
979
980
|
|
|
980
|
-
This section describes the 1.
|
|
981
|
+
This section describes the 1.6.0 and engine `v1.6.0` pair. The Pine execution adapter is
|
|
981
982
|
the engine's full Pine execution runtime (`PineExecutionAdapter` and
|
|
982
983
|
`PineStrategyHost` in the engine's `src/source/`): order lifecycle, bracket
|
|
983
984
|
legs, fill-price and slippage rules, POOC / `calc_on_order_fills`, margin
|
|
@@ -1000,9 +1001,9 @@ Regenerate old generated C++ before using a new engine for Pine execution. C++
|
|
|
1000
1001
|
generated before the source-layer cut
|
|
1001
1002
|
([#129](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/129)),
|
|
1002
1003
|
0.10.4's included, derives from `BacktestEngine` and does not compile against
|
|
1003
|
-
engine `v1.
|
|
1004
|
+
engine `v1.6.0`; old cap-only C++ does not attach the priority rule, and
|
|
1004
1005
|
metadata cannot silently restore it. Rebuild all modules against the
|
|
1005
|
-
new matching C++ layout (`engine_script_run_v19` in engine `v1.
|
|
1006
|
+
new matching C++ layout (`engine_script_run_v19` in engine `v1.6.0`). Retaining
|
|
1006
1007
|
that epoch does not promise equal fingerprints, state hashes or trades across
|
|
1007
1008
|
releases. The extraction preserves Pine policy
|
|
1008
1009
|
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.
|
|
45
|
+
table and update every line that names `1.6.0` or `v1.6.0` 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.
|
|
55
|
+
`@pineforge/codegen-pyodide`. It describes 1.6.0 (2026-10-17)
|
|
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.
|
|
129
|
-
in engine `v1.
|
|
128
|
+
([`src/source/`](https://github.com/pineforge-4pass/pineforge-engine/tree/v1.6.0/src/source)
|
|
129
|
+
in engine `v1.6.0`), 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
|
|
|
@@ -540,6 +540,7 @@ Generated C++ compiles only against the engine it was generated for:
|
|
|
540
540
|
| 1.3.0 (PyPI, 2026-10-06) | `v1.3.0` | The pair the `pineforge-release` image `1.3.0` ships. Its C++ adds the confirmed-bar receipt, which engine `v1.3.0`'s live runner reads, and the order-shapes receipt; engine `v1.3.0`'s `<pineforge/pineforge.h>` is `v1.2.0`'s. Regenerate and relink. |
|
|
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
|
+
| 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. |
|
|
543
544
|
| Later `X.Y.Z` releases | `vX.Y.Z` of the same version | See below. |
|
|
544
545
|
|
|
545
546
|
On the 0.x line the engine and codegen versions are independent, and the
|
|
@@ -565,8 +566,8 @@ Pine as `strategy.pine`, write `strategy.generated.cpp` with the
|
|
|
565
566
|
[file example](#transpile-a-file-to-a-cpp) above, then from the same directory:
|
|
566
567
|
|
|
567
568
|
```bash
|
|
568
|
-
# 1.
|
|
569
|
-
git clone --branch v1.
|
|
569
|
+
# 1.6.0 pairs with engine v1.6.0. For 0.10.4 use v0.13.1.
|
|
570
|
+
git clone --branch v1.6.0 https://github.com/pineforge-4pass/pineforge-engine.git
|
|
570
571
|
cd pineforge-engine
|
|
571
572
|
cp ../strategy.generated.cpp tutorial/macd/generated.cpp # the tutorial's strategy slot
|
|
572
573
|
bash tutorial/run.sh # needs cmake, a C++17 compiler and python3
|
|
@@ -692,7 +693,7 @@ quote. The commercial-license store (coming soon) will take orders online.
|
|
|
692
693
|
|
|
693
694
|
## Explicit Pine execution attachment
|
|
694
695
|
|
|
695
|
-
This section describes the 1.
|
|
696
|
+
This section describes the 1.6.0 and engine `v1.6.0` pair. The Pine execution adapter is
|
|
696
697
|
the engine's full Pine execution runtime (`PineExecutionAdapter` and
|
|
697
698
|
`PineStrategyHost` in the engine's `src/source/`): order lifecycle, bracket
|
|
698
699
|
legs, fill-price and slippage rules, POOC / `calc_on_order_fills`, margin
|
|
@@ -715,9 +716,9 @@ Regenerate old generated C++ before using a new engine for Pine execution. C++
|
|
|
715
716
|
generated before the source-layer cut
|
|
716
717
|
([#129](https://github.com/pineforge-4pass/pineforge-codegen-oss/pull/129)),
|
|
717
718
|
0.10.4's included, derives from `BacktestEngine` and does not compile against
|
|
718
|
-
engine `v1.
|
|
719
|
+
engine `v1.6.0`; old cap-only C++ does not attach the priority rule, and
|
|
719
720
|
metadata cannot silently restore it. Rebuild all modules against the
|
|
720
|
-
new matching C++ layout (`engine_script_run_v19` in engine `v1.
|
|
721
|
+
new matching C++ layout (`engine_script_run_v19` in engine `v1.6.0`). Retaining
|
|
721
722
|
that epoch does not promise equal fingerprints, state hashes or trades across
|
|
722
723
|
releases. The extraction preserves Pine policy
|
|
723
724
|
under explicit attachment; it does not implement the generic native
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.6.1-rc.1
|
|
@@ -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.
|
|
4
|
+
later additions. This revision includes the 1.6.0 pair (2026-10-17).
|
|
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
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/types.py
RENAMED
|
@@ -173,6 +173,13 @@ class TypeHelper:
|
|
|
173
173
|
return TypeSpec.primitive("bool")
|
|
174
174
|
if isinstance(value, StringLiteral):
|
|
175
175
|
return TypeSpec.primitive("string")
|
|
176
|
+
if isinstance(value, UnaryOp):
|
|
177
|
+
if value.op == "not":
|
|
178
|
+
return TypeSpec.primitive("bool")
|
|
179
|
+
operand = self._array_from_element_spec(value.operand)
|
|
180
|
+
if operand is not None and operand.kind == "primitive" and operand.name in ("int", "int64", "float"):
|
|
181
|
+
return operand
|
|
182
|
+
return None
|
|
176
183
|
if isinstance(value, BinOp):
|
|
177
184
|
left = self._array_from_element_spec(value.left)
|
|
178
185
|
right = self._array_from_element_spec(value.right)
|
|
@@ -507,7 +514,20 @@ class TypeHelper:
|
|
|
507
514
|
elem = self._type_spec_from_hint(targs[0]) or TypeSpec.udt(targs[0])
|
|
508
515
|
return TypeSpec.array(elem)
|
|
509
516
|
if func == "from" and value.args:
|
|
510
|
-
|
|
517
|
+
elem_specs = [
|
|
518
|
+
self._array_from_element_spec(arg)
|
|
519
|
+
or self._pine_type_to_spec(self._visit(arg))
|
|
520
|
+
for arg in value.args
|
|
521
|
+
]
|
|
522
|
+
if any(
|
|
523
|
+
s is not None and s.kind == "primitive" and s.name == "float"
|
|
524
|
+
for s in elem_specs
|
|
525
|
+
) and all(
|
|
526
|
+
s is not None and s.kind == "primitive" and s.name in ("int", "int64", "float")
|
|
527
|
+
for s in elem_specs
|
|
528
|
+
):
|
|
529
|
+
return TypeSpec.array(TypeSpec.primitive("float"))
|
|
530
|
+
first_spec = elem_specs[0]
|
|
511
531
|
if first_spec is not None:
|
|
512
532
|
return TypeSpec.array(first_spec)
|
|
513
533
|
first = self._visit(value.args[0])
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/types.py
RENAMED
|
@@ -1373,6 +1373,13 @@ class TypeInferer:
|
|
|
1373
1373
|
slot populated; recover that exact scalar here rather than silently
|
|
1374
1374
|
defaulting ``array.from(string_udf())`` to ``std::vector<double>``.
|
|
1375
1375
|
"""
|
|
1376
|
+
if isinstance(node, UnaryOp):
|
|
1377
|
+
if node.op == "not":
|
|
1378
|
+
return TypeSpec.primitive("bool")
|
|
1379
|
+
operand = self._array_from_element_spec(node.operand)
|
|
1380
|
+
if operand is not None and operand.kind == "primitive" and operand.name in ("int", "int64", "float"):
|
|
1381
|
+
return operand
|
|
1382
|
+
return None
|
|
1376
1383
|
if isinstance(node, BinOp):
|
|
1377
1384
|
left = self._array_from_element_spec(node.left)
|
|
1378
1385
|
right = self._array_from_element_spec(node.right)
|
|
@@ -1527,12 +1534,30 @@ class TypeInferer:
|
|
|
1527
1534
|
node.name
|
|
1528
1535
|
)
|
|
1529
1536
|
if found_udt_binding:
|
|
1530
|
-
|
|
1531
|
-
TypeSpec.udt(exact_udt)
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1537
|
+
if exact_udt is not None:
|
|
1538
|
+
return TypeSpec.udt(exact_udt)
|
|
1539
|
+
local_cpp = getattr(self, "_current_func_local_types", {}).get(node.name)
|
|
1540
|
+
local_prim = {
|
|
1541
|
+
"int": "int",
|
|
1542
|
+
"int64_t": "int64",
|
|
1543
|
+
"double": "float",
|
|
1544
|
+
"bool": "bool",
|
|
1545
|
+
"std::string": "string",
|
|
1546
|
+
}.get(local_cpp)
|
|
1547
|
+
if local_prim is not None:
|
|
1548
|
+
return TypeSpec.primitive(local_prim)
|
|
1549
|
+
return None
|
|
1535
1550
|
if self._collection_name_is_lexically_shadowed(node.name):
|
|
1551
|
+
local_cpp = getattr(self, "_current_func_local_types", {}).get(node.name)
|
|
1552
|
+
local_prim = {
|
|
1553
|
+
"int": "int",
|
|
1554
|
+
"int64_t": "int64",
|
|
1555
|
+
"double": "float",
|
|
1556
|
+
"bool": "bool",
|
|
1557
|
+
"std::string": "string",
|
|
1558
|
+
}.get(local_cpp)
|
|
1559
|
+
if local_prim is not None:
|
|
1560
|
+
return TypeSpec.primitive(local_prim)
|
|
1536
1561
|
return None
|
|
1537
1562
|
sym = self.ctx.symbols.resolve(node.name)
|
|
1538
1563
|
if sym is not None:
|
|
@@ -1762,8 +1787,28 @@ class TypeInferer:
|
|
|
1762
1787
|
if targs:
|
|
1763
1788
|
return TypeSpec.array(self._type_spec_from_hint_name(targs[0]) or TypeSpec.udt(targs[0]))
|
|
1764
1789
|
if func_name == "from" and node.args:
|
|
1790
|
+
elem_specs = [
|
|
1791
|
+
self._array_from_element_spec(arg)
|
|
1792
|
+
for arg in node.args
|
|
1793
|
+
]
|
|
1794
|
+
if any(
|
|
1795
|
+
s is not None and s.kind == "primitive" and s.name == "float"
|
|
1796
|
+
for s in elem_specs
|
|
1797
|
+
) and all(
|
|
1798
|
+
(s is None or (s.kind == "primitive" and s.name in ("int", "int64", "float")))
|
|
1799
|
+
for s in elem_specs
|
|
1800
|
+
):
|
|
1801
|
+
return TypeSpec.array(TypeSpec.primitive("float"))
|
|
1802
|
+
if any(
|
|
1803
|
+
s is not None and s.kind == "primitive" and s.name == "int64"
|
|
1804
|
+
for s in elem_specs
|
|
1805
|
+
) and all(
|
|
1806
|
+
s is not None and s.kind == "primitive" and s.name in ("int", "int64")
|
|
1807
|
+
for s in elem_specs
|
|
1808
|
+
):
|
|
1809
|
+
return TypeSpec.array(TypeSpec.primitive("int64"))
|
|
1765
1810
|
return TypeSpec.array(
|
|
1766
|
-
|
|
1811
|
+
elem_specs[0]
|
|
1767
1812
|
or TypeSpec.primitive("float")
|
|
1768
1813
|
)
|
|
1769
1814
|
return TypeSpec.array(TypeSpec.primitive("float"))
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/visit_call.py
RENAMED
|
@@ -2202,6 +2202,10 @@ class CallVisitor:
|
|
|
2202
2202
|
# ``color[] cs = array.from(c1, c2)`` declares
|
|
2203
2203
|
# ``std::vector<int64_t>`` and must construct one.
|
|
2204
2204
|
declared = self._collection_spec_for_name(target)
|
|
2205
|
+
if declared is None and getattr(self, "_active_func_name", None) is not None:
|
|
2206
|
+
declared = self._callable_var_collection_spec(
|
|
2207
|
+
target, self._active_func_name
|
|
2208
|
+
)
|
|
2205
2209
|
if (declared is not None and declared.kind == "array"
|
|
2206
2210
|
and declared.element is not None
|
|
2207
2211
|
and declared.element.kind == "primitive"
|
|
@@ -2408,13 +2412,16 @@ class CallVisitor:
|
|
|
2408
2412
|
and func_name in TIME_FIELD_EXPRS
|
|
2409
2413
|
and (node.args or node.kwargs)
|
|
2410
2414
|
):
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2415
|
+
bound = self._resolve_func_args(node, func_name)
|
|
2416
|
+
ts_node = bound.get("time")
|
|
2417
|
+
ts_arg = (
|
|
2418
|
+
self._visit_expr(ts_node)
|
|
2419
|
+
if ts_node is not None
|
|
2420
|
+
else "current_bar_.timestamp"
|
|
2421
|
+
)
|
|
2416
2422
|
ts_arg = self._coerce_int_slot(ts_arg, ts_node, "int64_t")
|
|
2417
|
-
|
|
2423
|
+
tz_node = bound.get("timezone")
|
|
2424
|
+
tz_arg = self._visit_expr(tz_node) if tz_node is not None else None
|
|
2418
2425
|
field_expr = TIME_FIELD_EXPRS[func_name]
|
|
2419
2426
|
if tz_arg is None:
|
|
2420
2427
|
# 1-arg form — fall back to ``syminfo.timezone`` per TV
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.6.0-rc.1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/__init__.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/base.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/contracts.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/diagnostics.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/analyzer/tables.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/builtin_keywords.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/capabilities.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/constant_fold.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/drawing.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/emit_top.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/host_members.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/input.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/order_shapes.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/run_stops.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/security.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/tables.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/visit_expr.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/codegen/visit_stmt.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/collection_history.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/diagnostic_codes.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/diagnostics_catalog.json
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/external_requests.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/finite_ta_length.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/library_inline.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/library_modules.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/matrix_overloads.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/method_binding.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/pine_libraries.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/pine_spelling.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/request_discovery.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/security_contexts.py
RENAMED
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/session_reads.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/support_checker.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/timeframe_token_cli.py
RENAMED
|
File without changes
|
|
File without changes
|
{pineforge_codegen-1.6.0rc1 → pineforge_codegen-1.6.1rc1}/pineforge_codegen/tv_input_choices.py
RENAMED
|
File without changes
|
|
File without changes
|