Skip to content

[fork-ffi] console: group, groupCollapsed and groupEnd are missing from the fork #268

Description

@Unisay

Problem

Upstream purescript-console v6.1.0 exports group, groupCollapsed and groupEnd (all Effect foreigns). The Lua fork ships v6.1.x but has none of them, so code written against the registry package fails to compile against the fork. Found by the #186 audit's upstream diff; console is otherwise foreign-for-foreign identical to upstream.

Approach

Console grouping has no direct terminal equivalent, so mirror the JS semantics approximately rather than exactly: keep an indentation level in the FFI module, have group/groupCollapsed print the label and increase it, groupEnd decrease it, and prefix log/warn/error output with the current indent. A plain no-op-indent implementation is also acceptable if the maintenance cost of stateful output is not wanted: the point is API completeness, not console fidelity. Add regression coverage, release a patch, bump the set.

Prerequisites / Relations

None blocking. Found by the #186 audit's upstream diff (closed). Ships as a console fork patch release plus a package-set bump.

Verification / Measurement

A program using group/groupEnd compiles against the fork, and the regression test pins whichever output behaviour is chosen.

Metadata

Metadata

Assignees

Labels

area: package-setBug in a package-set fork (FFI/sources), not the compilerbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions