Skip to content

repl completion for large buffers fails to display named properties #21446

Closed
@killagu

Description

  • Version: v10.5.0
  • Platform: macOS
  • Subsystem:REPL

When alloc a large buffer, and input a. then press tab. It's a warning.

> a = Buffer.alloc(1024*1024)
<Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... >
> a.
(node:7432) REPLWarning: The current array, Buffer or TypedArray has too many entries. Certain properties may be missing from completion output.

But it works well, when alloc a small buffer.

> a = Buffer.alloc(1024)
<Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ... >
> a.
a.__defineGetter__      a.__defineSetter__      a.__lookupGetter__      a.__lookupSetter__      a.__proto__             a.constructor           a.hasOwnProperty        a.isPrototypeOf         a.propertyIsEnumerable
a.toLocaleString        a.toString              a.valueOf               

a.buffer                a.byteLength            a.byteOffset            a.copyWithin            a.entries               a.every                 a.fill                  a.filter                a.find
a.findIndex             a.forEach               a.includes              a.indexOf               a.join                  a.keys                  a.lastIndexOf           a.length                a.map
a.reduce                a.reduceRight           a.reverse               a.set                   a.slice                 a.some                  a.sort                  a.subarray              a.values

a.BYTES_PER_ELEMENT     

a.asciiSlice            a.asciiWrite            a.base64Slice           a.base64Write           a.compare               a.copy                  a.equals                a.hexSlice              a.hexWrite
a.inspect               a.latin1Slice           a.latin1Write           a.offset                a.parent                a.readDoubleBE          a.readDoubleLE          a.readFloatBE           a.readFloatLE
a.readInt16BE           a.readInt16LE           a.readInt32BE           a.readInt32LE           a.readInt8              a.readIntBE             a.readIntLE             a.readUInt16BE          a.readUInt16LE
a.readUInt32BE          a.readUInt32LE          a.readUInt8             a.readUIntBE            a.readUIntLE            a.swap16                a.swap32                a.swap64                a.toJSON
a.ucs2Slice             a.ucs2Write             a.utf8Slice             a.utf8Write             a.write                 a.writeDoubleBE         a.writeDoubleLE         a.writeFloatBE          a.writeFloatLE
a.writeInt16BE          a.writeInt16LE          a.writeInt32BE          a.writeInt32LE          a.writeInt8             a.writeIntBE            a.writeIntLE            a.writeUInt16BE         a.writeUInt16LE
a.writeUInt32BE         a.writeUInt32LE         a.writeUInt8            a.writeUIntBE           a.writeUIntLE           

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.replIssues and PRs related to the REPL subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions