HaxeFoundation / HaxeFoundation/haxe

ctx.store_exception_stack is always disabled for custom js generator

Open
#6,151 0 comments 0 reactions 0 assignees View on GitHub
platform-javascript
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

Its initial value is defined in `alloc_ctx` (genjs.ml)
as
`store_exception_stack = if Common.has_dce com then (Common.has_feature com "haxe.CallStack.exceptionStack") else List.exists (function TClassDecl { cl_path=["haxe"],"CallStack" } -> true | _ -> false) com.types;`
But for some odd reason it does not affect custom js generator, despite that `alloc_ctx` is called by `MacroApi.set_js_generator`

If for some reason it cannot be fixed, maybe you can store and use `store_exception_stack` as feature, so it can be overriden from custom generator?
Or at least expose it via JSGenApi?
Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.