Strict Symbol Comparison logging during development
Enabling comparison during development can be done in a few different ways:
Log EqualityArgumentSignals
This logs individual string / symbol comparison mismatches. This is not usable early on in conversion due to the flood of signals, but is fine once the conversion is largely done.
First Strict Symbol support must be fully configured in the image:
GtStrictSymbolInstallation new initializeFfiCallout; refactorSymbol; switchSymbolTables; registerStartup; installStringAndSymbolEquals
After that, the signal can be configured and enabled, and a logger started:
GtStrictSymbolEqualityArgumentSignal setLogStringSymbolOnly; start. CircularMemoryLogger startFor: GtStrictSymbolEqualityArgumentSignal.
Analysing the logs
Filtered Summary
This will filter out signals that are known to perform mismatched searches:
"Open the filtered view assuming the CircularMemoryLogger global instance has been started, as above" GtStrictSymbolFilteredLog new signalLogger: CircularMemoryLogger instance.
Comparison Summary
This will include a signal for each mismatching call to #=
. If a wide enough portion of the code base has been executed, summary entries can be generated which will provide better refactoring suggestions.
This is generally only used early in the conversion cycle.
summaryLogger := GtStrictSymbolComparisonSummaryLogger new. CircularMemoryLogger instance recordings do: [ :signal | summaryLogger nextPut: signal ]. summaryLogger.