Skip to content

repl: stop completion at a program getter or a Proxy - #47153

Open
robobun wants to merge 4 commits into
robobun/1a5108d4/strict-bun-defined-getterfrom
robobun/1a5108d4/repl-completion-no-user-code
Open

robobun wants to merge 4 commits into
robobun/1a5108d4/strict-bun-defined-getterfrom
robobun/1a5108d4/repl-completion-no-user-code

Conversation

@robobun

@robobun robobun commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #47152.

Problem

  • bun repl completion runs code the user only typed: o.x.th calls the getter x 3 times. A getter that loops freezes the REPL, and one that exits ends it.
  • Cause: Bun__REPL__getProperty (src/jsc/bindings/bindings.cpp:7158) does an ordinary [[Get]] for each name before the cursor, on each key. Bun__REPL__getCompletions calls Proxy traps.
  • This reverses repl: inline ghost-text suggestions for symbol autocomplete #30413, which "deliberately runs getters". Node v26.3.0 calls no own getter. No user reported it.

Fix

  • One walk serves both bindings. It reads data, native properties and getters that isBunDefinedGetter accepts. It stops in front of a program getter and in front of a Proxy.
  • Where the walk stops, Tab leaves the line as typed.
  • Verified: test/js/bun/repl/repl.test.ts. 16 new tests fail on main. All 159 pass.
  • Self-reviewed: 45 concerns raised, 42 addressed (Notes).

Background

  • A JavaScriptCore property slot is a value, a native getter, or an accessor. getOwnPropertySlot fills it and calls nothing.
  • Not a sandbox: a getter of Bun's own still runs and can read the program's objects (rl.columns.).
  • Weighed: a time limit cannot stop process.exit() or a side effect. To refuse every getter loses fs.promises..

Downsides

  • No completion past a program getter or a Proxy: every export of require("typescript"), jsdom's dom.window.. Evaluate the getter, then complete from _.
  • Stricter than Node v26.3.0, which still calls class getters. Notes gives two narrower rules: own getters only, typing only.
  • 16 of 886 accessors of Bun's own stop too (crypto.fips.). Per chain step: +13 instructions (own data) to +580 (9 prototype hops). Text: +512 bytes.
Notes

This reverses a choice of #30413. That PR added the suggestion drawn while you type, and Bun__REPL__getProperty. Its description says: "This deliberately runs getters, as node's completion preview does". Its review flagged that getters and Proxy traps "run on every keystroke while the terminal is in raw mode", and proposed a lookup with getOwnPropertySlot that does not call the getter. The author's reply kept the calls as "the same behaviour node's REPL has", with a watchdog as a follow-up "if it turns out to matter in practice". No maintainer commented on that thread. This PR builds that lookup. A maintainer can narrow it, see "Narrower rules".

Calls of program code while each chain is typed, one key at a time. Release builds, on a pty. "main" is 11c3671.

What the program defined, and the chain Node v26.3.0 bun --interactive bun repl main bun repl here
own getter, __own.x.al 0 0 3 0
class getter, __inst.x.al 13 13 3 0
getter on globalThis, __glob.al 9 9 3 0
bound function as getter 0 0 3 0
util.deprecate(fn) as getter 0 0 3 0
callable Proxy as getter 0 0 3 0
Proxy, __proxy.a.th 0 0 10 0
Proxy in a property, __holder.p.ze 0 0 6 0
property of a Proxy prototype, __child.a.th 66 21 10 0
names of a Proxy prototype, __heir.ze 54 18 6 0
global of a vm context on a Proxy, __vmGlobal.a.th 81 18 6 0
  • Node's count for __child.a.th is not the same in every run (66, then 60).
  • With Right, End and Tab twice after each chain (the pty test), main counts 6 to 16 calls for each row. This branch counts none.
  • Five rows are stricter than Node v26.3.0 and than bun --interactive: the class getter, the getter on globalThis, both Proxy prototype rows and the vm context row. Node tests own properties only. A class getter with process.exit(7) ends Node, bun --interactive and bun repl on main with code 7 while k.x.a is typed. This branch stays alive.
  • bun --interactive is a port of Node's completer (src/js/internal/repl/completion.js). This PR does not change it, so the two REPLs now differ in those five rows.
  • Node's main has repl: use inspector over vm nodejs/node#64034 (semver-major, not in v26): "Certain side-effect free Proxy's, Getters, and other non-static properties can be tab/auto-completed." That rule needs a check for a call without side effects. bun repl has no such check.

The rule.

  • The walk visits the object and then each prototype. In front of a Proxy it stops, also in front of one that Bun makes. The exception is process.env on Windows, which is a Proxy that Bun makes (windowsEnv). The walk reads it as main does.
  • The global of a node:vm context whose sandbox is a Proxy counts as a Proxy. That global asks its sandbox for each name, so a read through it calls the getOwnPropertyDescriptor trap.
  • On each object it asks getOwnPropertySlot. The slot is an own-property slot, not a VMInquiry slot: that one forbids the JS that Bun's lazy properties run on their first read.
  • A value slot and a native (custom) slot are read. An accessor slot is read when isBunDefinedGetter accepts its getter, see Read accessors whose getter wraps user code at load time, not while an importer links #47152 for that test. Else the walk stops. An accessor with a setter and no getter reads as undefined, so the chain leads to nothing.
  • Bun__REPL__getProperty reports the stop through bool* refused. Bun__REPL__getCompletions reports a list that a Proxy cut short through bool* incomplete.
  • With refused, or with incomplete and no name, Tab redraws the line. With incomplete and names, Tab lists them and inserts none, and no suggestion is drawn. A chain that leads to nothing still gets the two spaces.

Not fixed. Program code still runs on these routes.

  • A getter of Bun's own that reads the program's object: rl.columns. on a readline interface whose output has a columns getter (8 calls, as on main), a RegExp subclass with get global() behind r.flags. (3, as on main).
  • Error.prepareStackTrace runs once for each Error that completion lists or whose stack it reads (as on main).
  • The first read of process.stdout calls a newListener listener (1, as on main).
  • A function of Bun's own that has the name get and that the program installs as a getter (get: http.get) is called.
  • Typing ReadableStreamDefaultReader.prototype.closed.th still prints 3 late TypeError lines. The native getter returns a promise that it rejected. A blind markAsHandled() on the result would also hide a rejection that the program made and that a native getter only returns. Handle the rejection of a native getter that the formatter or a debugger preview read #41630 adds the test that tells the two apart. With it this is one call at the read.
  • Four getters of vm.Script.prototype do not return for a wrong receiver (node:vm: Script results are own properties of the instance, as in Node #41776), so vm.Script.prototype.sourceMapURL. still freezes the REPL.
  • The REPL cannot interrupt running JavaScript (repl: interrupt a running evaluation with Ctrl+C #33411). A time limit around completion would make the loops above recoverable. It cannot replace this rule, because it stops neither process.exit() nor a side effect that finishes.

Completions that stop.

  • Past a getter or a Proxy that the program or a package defines. Checked on release builds:
    • ts = require("typescript"), then ts.SyntaxKind.Unk (main suggests nown). All 2,248 exports of typescript 6.0.2 are own getters. esbuild writes the exports of a CommonJS bundle this way. Node v26.3.0 calls no own getter, so it stops there too.
    • dom = new JSDOM(...), then dom.window.docu and doc.body.inner (main suggests ment and HTML). These are class getters, which Node v26.3.0 calls.
    • First-level names still complete (ts.versi).
  • Past an accessor of a native addon (N-API) and an FFI function used as a getter. Both are host functions of another class (NapiClass, the FFI function class). The FFI case has a test. The N-API case follows from Napi::defineProperty and was not run with an addon.
  • At every Proxy: _ does not help there. Copy the object first (copy = { ...proxy }).
  • At a Proxy that Bun makes, except process.env on Windows: require("module").wrapper. (main completes len to length), the socket of an http2 session or stream (session.socket.), an object from mock.property() of node:test, a function from CallTracker.calls(). The http2 and CallTracker cases are read from the code and were not run. require.cache. has no completions on main either, because its keys are paths.
  • Why not trust every Proxy that Bun makes: mock.property() and CallTracker.calls() forward each read to an object of the program. On main, Tab on t.x.al runs the getter x of the object behind mock.property(). A mark on each Proxy that reads only Bun's own state is possible (a private name on the handler). This PR does not add one.
  • 16 of the 886 string-keyed accessors of JSC's and Bun's own that a census reached (globals, builtin modules and prototypes, through the real walk with Tab on piped stdin):
    • the value is a Proxy that Bun makes (2): module.wrapper, require.cache
    • the getter is installed as a named function, get: getName (7): crypto.fips, http.Server maxHeadersCount and httpAllowHalfOpen, Bun.sql.options, IncomingMessage rawHeaders, crypto.Hash _readableState and _writableState
    • the getter is a deprecate() wrapper (7): OutgoingMessage _headers and _headerNames, dgram.Socket _handle, _receiving, _bindState, _queue, _reuseAddr
  • A docs section (docs/runtime/repl.mdx, "Completion") says where completion stops and what to do.

Narrower rules a maintainer can choose.

  • Own getters and Proxies only, as Node v26.3.0: one more condition at the accessor test (slot.slotBase() == receiver). Class getters then complete again and run again, with the freeze and the exit.
  • Strict while typing, Node's rule on Tab. Against it: Tab is also a TAB byte from a paste or a pipe, it is the only completion with NO_COLOR, on a continuation line and in .editor, and one Tab through a looping class getter still freezes the REPL.
  • To refuse every accessor that holds a getter function (no test of the getter at all): native slots stay readable, and the routes through rl.columns., r.flags. and get: http.get close. It loses fs.promises., map.size., buffer.buffer. and x.__proto__..

Measurements. Release builds of main 11c3671 and of this branch, gdb single-step of the main thread, piped stdin, the third and fourth Tab cycle. The counts are the same in both cycles unless two values are given.

Bun__REPL__getProperty, one call instructions indirect calls
first name, on the global 652 to 610 1 to 1
own data (o.a) 560 to 573 0 to 1
inherited over 1 hop (o.constructor) 670 to 746 0 to 2
inherited over 9 hops 810 to 1,390 0 to 10
lazy property after its first read (process.argv) 622 to 634 0 to 1
native accessor (process.title) 1,063 to 1,073 3 to 4
host getter (map.size) 979 to 1,162 1 to 3
builtin JS getter (fs.promises) 1,134 to 1,180 1 to 2
  • One Tab completion of o.a.b.c.zzq, no getter and no Proxy: 12,275 to 12,296 instructions, 1,969 to 1,985 conditional branches, 38 to 41 indirect calls, 12 to 12 syscalls.
  • One Tab completion over 9 prototype hops: 10,513 to 11,163 instructions. The listing part of that count moved by 92 between two builds of this branch with the same listing code.
  • Bun__REPL__getCompletions, one call: 4,670 to 4,692 for 2 candidates. For process. (over 100 names): 73,731 to 73,734 with the same environment. That count moves with the environment variables alone (71,609 to 74,229 on main), so the builds show no difference there.
  • Per Tab cycle: mi_malloc in the two bindings 6 to 6, mi_free 6 to 6. The result array and its strings are built as before.
  • Text (nm -S, size): Bun__REPL__getProperty 349 to 912 bytes, Bun__REPL__getCompletions 1,536 to 1,624, whole binary 138,038,120 to 138,038,632 with Read accessors whose getter wraps user code at load time, not while an importer links #47152. The stripped file has the same size.
  • Bun__REPL__ symbols: 4 to 4, none exported. Two signatures change, each in three places (bindings.cpp, headers.h, repl.rs).
  • Windows lanes that execute the process.env exception: 0 to 2. The piped Tab tests ran on Windows 2019 x64 and on Windows 11 aarch64 in CI build 134345 (9559627): 78 pass, 0 fail, the pty tests are todo there.
  • Tools: gdb, nm, size. perf, strace, valgrind and bloaty are not on the machine.

Tests.

  • programCode is one table of what a program can put behind a read (12 rows). A piped test presses Tab on each row and runs on every platform. One pty test for each row types the chain, then presses Right, End and Tab twice. Both read one counter per row. On main every row counts.
  • A piped test pins what Tab does to the line: the getter, the Proxy, the Proxy prototype, the cut list, the chain that leads to nothing and the property with a setter and no getter.
  • A pty test defines get: process.exit and a looping getter and types through both. On main the REPL exits with code 0.
  • 12 test.each rows pin what still completes, one row for each kind of read (lazy property, native accessor, engine getter, three spellings of a getter in src/js, module namespace, process.env). They pass on main.
  • A piped test completes process.env names, a chain through one, and through process.env.TZ. Nothing ran on Windows locally. CI build 134345 ran this test on both Windows lanes. It is the Windows coverage of the process.env exception.
  • Each clause of the getter test was removed in a local build. A test fails for each: the FFI row (class), the process.exit test (host name), the util.deprecate row (any builtin function), fs.promises.readF (getter syntax), __events.defaultMaxListeners.toF (the name get).
  • Also run: the completion tests with BUN_JSC_validateExceptionChecks=1, and test/internal/source-lints.

Other open PRs.

Placement. The helpers are in bindings.cpp, beside the two completion bindings that use them. The four Bun__REPL__ bindings are in that file on main. REVIEW.md asks for no bindings in bindings.cpp. This PR adds none and does not move the existing ones: a move hides the change to the two functions, it conflicts with #46316 and #45267, and a new .cpp shifts the unified bundles or compiles alone. A follow-up can move the four bindings with no change in behaviour. A maintainer can ask for the move here.

Self-review. 45 concerns raised, 42 addressed in the code, the tests or this text. Rejected:

  • A binding in bun:internal-for-testing that calls the walk in-process: it adds a host function for tests only. The piped tests run on every platform today.
  • A census of Bun's refused accessors as a test: it takes minutes on a debug build and fails for every new getter. The table rows pin each kind of getter.
  • Marking a returned rejection as handled without Handle the rejection of a native getter that the formatter or a debugger preview read #41630: see "Not fixed".

no test proof · iteration 0 · platform-specific test(s) that do not run on this machine, deferring to CI, which covers all platforms: test/js/bun/repl/repl.test.ts

The ghost text and Tab resolve the chain in front of the cursor on each
key. The walk called every getter and Proxy trap on the way, so code
that the user only typed ran: a getter with a side effect ran once for
each key, a getter that loops froze the REPL, and a getter that calls
process.exit() ended it.

One walk now serves both completion bindings. It reads a data property,
a native property, and a getter that isBunDefinedGetter accepts. It
stops in front of a getter of the program and in front of a Proxy, and
calls neither. Tab leaves the line as typed where the walk stops, and
inserts no name from a list that a Proxy cut short.
@robobun

robobun commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator Author
Updated 8:39 AM PT - Oct 28th, 2026

❌ @robobun, your commit 2f7cb33 has 59 failures in Build #134389 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 47153

That installs a local version of the PR into your bun-47153 executable, so you can run:

bun-47153 --bun

@robobun

robobun commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator Author

Status

  • Reproduced on a pty with a release build of main 11c3671. Typing __own.x.al in bun repl calls the getter x 3 times. A getter that is process.exit ends the session while the chain is typed.
  • With this branch neither getter is called, and the session stays alive.
  • 16 new tests in test/js/bun/repl/repl.test.ts fail on main and pass here.
  • CI build 134389 (2f7cb33): every test-bun job that ran passed, on the Linux lanes, the ASAN lane, both Windows lanes and macOS aarch64. The macOS x64 jobs expired without an agent. The red jobs are all test/aot tests on the test-aot-drawn lanes, which are red on main too: minify/BunImportNamespaceAndNamed fails the same way on a local release build of main.
  • PR: repl: stop completion at a program getter or a Proxy #47153, stacked on Read accessors whose getter wraps user code at load time, not while an importer links #47152.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Beyond the inline findings, I also checked the mechanics of the new walk in src/jsc/bindings/bindings.cpp: both out-params (incomplete, refused) are written before every early return, getPrototype is only ever called on an object the Proxy check already passed so no getPrototypeOf trap runs, every throwing call is checked under the top exception scope and cleared before returning to Rust, and in src/runtime/cli/repl.rs a one-name list flagged incomplete falls through to the listing branch rather than being inserted. Those paths look correct; what remains for a maintainer is the policy question the inline comments raise (which Bun-made Proxies and Bun getters that read program objects should be exempt), which is a design call rather than a defect in the code.

Extended reasoning...

The change replaces ordinary [[Get]] and getOwnPropertyNames in the two REPL completion bindings with a shared prototype walk that stops at program-defined Proxies and non-Bun getters, threads two bool out-params through the Rust caller, and adds pty and piped-stdin tests. It touches no auth, crypto or injection surface; the risk is behavior regression in REPL completion and exception safety in native code. The three confirmed inline findings are about the policy boundary (Bun-made Proxies, Bun getters that read user objects, vm-context global proxies) rather than memory or exception bugs, and the ruled-out checks above cover the mechanical correctness of the walk and the Rust integration.

Comment thread src/jsc/bindings/bindings.cpp Resolved
Comment thread src/jsc/bindings/bindings.cpp Resolved
Comment thread src/jsc/bindings/bindings.cpp Resolved
The global of a node:vm context asks its sandbox for each name. When the
sandbox is a Proxy, the completion walk called its
getOwnPropertyDescriptor trap through that global. The walk now stops in
front of such a global, as it does in front of a Proxy.

The comments said that every Proxy other than process.env on Windows is
the program's. Bun makes more of them (require.cache, the http2 socket),
and completion stops at those too, because some of them forward to an
object of the program. The comments, the enum value and the docs now say
that the walk stops at a Proxy.
@robobun robobun changed the title repl: stop completion at a getter or Proxy that the program defines repl: stop completion at a program getter or a Proxy Oct 28, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Beyond the inline nits, I checked the plumbing of the new walk: refused/incomplete are set false before every early return, the exception scope is checked after each visit, getPrototype and slot.getValue, so nothing escapes to the Rust caller, and the headers.h/repl.rs signatures match. The vm-context-on-a-Proxy route raised on the previous push now stops in isProxyForREPLCompletion (GlobalProxyType branch) and has a row in programCode.

Extended reasoning...

The change rewrites the two REPL completion bindings in src/jsc/bindings/bindings.cpp to walk the prototype chain with getOwnPropertySlot, refusing program-defined getters and Proxies, and threads refused/incomplete out-params through src/runtime/cli/repl.rs; it touches no auth, crypto or injection surface. The remaining question is a product one (stricter than Node's completer, deliberately stopping at Bun-made Proxies), which the inline findings and the PR's own notes already surface for a maintainer.

Comment thread src/jsc/bindings/bindings.cpp Resolved
Comment thread src/jsc/bindings/bindings.cpp Resolved
The completion walk refused a chain through such a property, so Tab
left the line as typed. The property reads as undefined and there is
nothing to call, so the chain leads nowhere and Tab indents, as it does
on main.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Beyond the inline note, I also checked the exception handling of the new walk in src/jsc/bindings/bindings.cpp: every call that can enter JS (getPrototype, getOwnPropertySlot, slot.getValue, the Bun-accepted getter) is followed by a scope check, and both entry points clear the exception before returning to the Rust caller, so nothing escapes into repl.rs. The latest push also handles the vm-context-on-a-Proxy and setter-only-accessor paths raised on earlier versions (isProxyForREPLCompletion unwraps the global proxy to the NodeVMGlobalObject sandbox, and isGetterNull() maps a setter-only property to a miss), and both have tests in test/js/bun/repl/repl.test.ts.

Extended reasoning...

The change rewrites the REPL completion lookup in bindings.cpp to walk the prototype chain with own-property slots instead of [[Get]], refusing program-defined getters and Proxies, threads two new out-params through headers.h and repl.rs, and adds 16 tests. It touches no auth, crypto or injection surface; the one posted finding is a code-placement nit and a further verified finding was not posted, so approval is withheld and the note only records what else was examined.

Comment on lines +7061 to +7124
// Completion reads one Proxy: process.env on Windows, which Bun makes (windowsEnv in ProcessObjectInternals.ts). It stops at every other one, also at those of Bun's own modules (require.cache, the http2 socket), because some of them forward to an object of the program (mock.property in node:test).
static bool isBunProxyForREPLCompletion(JSC::JSGlobalObject* globalObject, JSC::JSObject* object)
{
#if OS(WINDOWS)
return object == defaultGlobalObject(globalObject)->m_processEnvObject.get();
#else
UNUSED_PARAM(globalObject);
UNUSED_PARAM(object);
return false;
#endif
}

// A Proxy, or the global of a node:vm context whose sandbox is one: that global asks its sandbox for each name.
static bool isProxyForREPLCompletion(JSC::JSObject* object)
{
switch (object->type()) {
case JSC::ProxyObjectType:
return true;
case JSC::GlobalProxyType:
object = uncheckedDowncast<JSC::JSGlobalProxy>(object)->target();
if (!object)
return false;
[[fallthrough]];
case JSC::GlobalObjectType: {
if (object->classInfo() != Bun::NodeVMGlobalObject::info())
return false;
JSC::JSObject* sandbox = uncheckedDowncast<Bun::NodeVMGlobalObject>(object)->contextifiedObject();
return sandbox && sandbox->type() == JSC::ProxyObjectType;
}
default:
return false;
}
}

enum class REPLCompletionWalk : uint8_t {
Found,
End,
Proxy,
Threw,
};

// Calls `visit` on `object` and then on each prototype until one returns true. Completion runs on every key the user types, so the walk stops in front of a Proxy and calls none of its traps.
template<typename Visit>
static REPLCompletionWalk walkForREPLCompletion(JSC::JSGlobalObject* globalObject, JSC::TopExceptionScope& scope, JSC::JSObject* object, const Visit& visit)
{
unsigned prototypeCount = 0;
for (JSC::JSObject* current = object;;) {
if (isProxyForREPLCompletion(current) && !isBunProxyForREPLCompletion(globalObject, current)) [[unlikely]]
return REPLCompletionWalk::Proxy;

bool found = visit(current);
if (scope.exception()) [[unlikely]]
return REPLCompletionWalk::Threw;
if (found)
return REPLCompletionWalk::Found;

JSC::JSValue prototype = current->getPrototype(globalObject);
if (scope.exception()) [[unlikely]]
return REPLCompletionWalk::Threw;
if (!prototype.isObject() || ++prototypeCount > JSC::JSObject::maximumPrototypeChainDepth)
return REPLCompletionWalk::End;
current = JSC::asObject(prototype);
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 nit (optional): maintainers get another 65 lines of REPL-only logic in the monolithic bindings.cpp, which the repository's review rules name as a file not to grow. The new helpers isBunProxyForREPLCompletion, isProxyForREPLCompletion, REPLCompletionWalk and walkForREPLCompletion at src/jsc/bindings/bindings.cpp:7061-7124 are used only by the two Bun__REPL__ bindings below them. Fix: move the REPL completion walk, together with the four existing Bun__REPL__ bindings, into a REPL-owned file (for example src/jsc/bindings/BunREPL.cpp) and update the otherMentions entry added in src/codegen/builtins/host/runtime-dependencies.builtins.ts:578 to that file.

Why this was flagged

The diff adds static helpers and an enum at src/jsc/bindings/bindings.cpp:7061-7124 and extends Bun__REPL__getCompletions and Bun__REPL__getProperty in the same file. The repository review instructions say new code goes in the module that owns the feature and explicitly list 'no bindings in monolithic bindings.cpp'. On the base branch the four Bun__REPL__ functions were already there, so this is a pre-existing placement that the change grows rather than fixes. No runtime behavior differs; the cost is to maintainers reading and building the file. The dependency catalog at src/codegen/builtins/host/runtime-dependencies.builtins.ts:578 now also names bindings.cpp for the m_processEnvObject.get mention at bindings.cpp:7065, so a move must update that entry.

Verification: nit. Trigger: unconditional on merge; this is a placement/scope issue, nothing runs differently. The diff adds, inside the monolithic file, four new REPL-only static helpers and an enum (src/jsc/bindings/bindings.cpp:7062), whose only callers are Bun__REPL__getCompletions (:7128) and Bun__REPL__getProperty (:7197) in the same file. The repository review instructions state "no bindings in monolithic bindings.cpp".

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The four Bun__REPL__ bindings are in bindings.cpp on main, and this PR adds no binding. It adds four static helpers that only the two completion bindings use, so they are beside those.

A file that the REPL owns is the better home for all of it. I did not do the move in this PR, for these reasons:

A follow-up that only moves the four bindings and these helpers, with no change in behaviour, is cleaner after the open REPL PRs land. If a maintainer wants the move in this PR, I will do it here.

This branch has not been deployed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant