Repository navigation
repl completion for large buffers fails to display named properties #21446
Copy link
Copy link
Closed
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.replIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.
Activity
Fishrock123 commentedon Jun 21, 2018
I think it might be fixable. We should lookup named properties first, which should be possible.
[-]repl bug[/-][+]repl completion for large buffers fails to display named properties[/+]thatshailesh commentedon Jun 22, 2018
Interesred in picking this up.. need some guidance
bnoordhuis commentedon Jun 22, 2018
Not without changes to V8 first. There is currently no way to retrieve a bounded number of own properties.
We might be able to make do with a for/in loop and check each key with
Object#hasOwnProperty().repl: tab auto complete big arrays
repl: tab auto complete big arrays