google/CodeCity

Dumper minor issues / feature requests

cpcallen opened this issue · 2 comments

A tracking bug for various small issues with Dumper. Some might get their own bug if they turn out to be non-trivial.

  • Dump WeakMaps (at least create them!)
  • Don't complain about nonconfigurable properties when you're not actually trying to reconfigure them.
  • Dumper.prototype.exprForFunction_ seems to unnecessarily request the deletion of the .name property of Functions created from anonymous function expressions.
  • RangeError: Maximum call stack size exceeded when dumping rest of prod DB
  • Investigate why so many Object.preventExtensions() calls are deferred to the final 'rest' dump.
  • ObjectDumper: update .ref to .preferredRef where possible.
  • Provide a (practical) way to create an object but then prune its properties
  • Option to defer and/or prune all .lastModifiedTime and .lastModifiedUser properties on function objects.
  • Add copyright notice and headers at top of each file.

Established that the complaint about non-configurable properties was legitimate: JSON.stringify.length had changed from 1 to 3, but (thanks to the way our snapshots work) this wasn't reflected in the prod database yet.

Established that Dumper.prototype.exprForFunction_ was doing the correct thing with .name properties: the issue is that there are some methods that were defined by anonymous function expressions that were not auto-named by the methodNames server option (maybe they predate it?), and do not have a .name, and Dumper was correctly recognising that assigning an anonymous function expression to a property would cause it to get a .name automagically.