Skip to content

js-slang is now Conductor-only: verify the build, and the remaining unported bundles #975

Description

@martin-henz

js-slang has become a Conductor-only runner (source-academy/js-slang#2070): it can no longer run Source outside Conductor, and ~18.5k lines that existed only to serve that are gone. source-academy/js-slang#2069 records what was kept and when each remaining piece can go.

This is a heads-up plus things to verify, not a breakage report — I checked before filing, and no bundle uses a removed API.

The good news

What this repo imports from js-slang is all kept:

Import Sites Status
js-slang/dist/stdlib/list 10 kept
js-slang/dist/types 5 kept
js-slang/dist/errors/base 4 kept
js-slang/dist/utils/stringify 3 kept
js-slang/dist/utils/rttc 2 kept
js-slang/dist/utils/operators 2 kept
js-slang (root) 6 kept

Nothing references compile/compileFiles, findDeclaration, getScope, getNames, SourceDocumentation, dist/vm, dist/typeChecker, dist/editors or dist/name-extractor.

Worth checking: 1. A real install

The above is static analysis of this repo's source. A yarn install against js-slang built from js-slang#2070, followed by yarn tsc:all and the bundle builds, is what actually settles it — particularly for the js-slang: "*" dependency at the workspace root and catalog: in modules-lib.

Worth checking: 2. The legacy module interop

requireProvider — the mechanism by which a non-Conductor Source module receives a fake require('js-slang') exposing the interpreter, parser, stdlib and utils/operators — still exists in js-slang, but only because java-slang borrows the module loader. It is on the removal list once java-slang#95 lands (js-slang#2069, section 3).

So bundles that are not yet Conductor-ported are living on borrowed time. conductor-modules.json currently lists 12 of ~25:

binary_tree, csg, curve, matrix, midi, pix_n_flix,
plotly, repeat, repl, rune, scrabble, sound

The remaining ones — game, unity_academy, robot_simulation, arcade_2d, physics_2d, nbody, painter, sound_matrix, stereo_sound, copy_gc, mark_sweep, unittest, rune_in_words, communication, wasm — will need porting before that removal, and are the real work here.

Context

Source now runs only under Conductor in the frontend, so a Source program can only reach a module through the Conductor module interface. The non-Conductor path that requireProvider serves is reachable today only for Java.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions