Skip to content

Commit

Permalink
feat: do not serialize the idMap of the normalized ast
Browse files Browse the repository at this point in the history
  • Loading branch information
EagleoutIce committed Sep 1, 2023
1 parent e537d58 commit f0642cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/cli/repl/server/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,15 @@ export class FlowRServerConnection {

void slicer.allRemainingSteps(false).then(results => {
sendMessage(this.socket, {
type: 'response-file-analysis',
id: message.id,
results
type: 'response-file-analysis',
id: message.id,
results: {
...results,
normalize: {
...results.normalize,
idMap: undefined
}
}
})
})
}
Expand Down
3 changes: 3 additions & 0 deletions src/cli/repl/server/messages/analysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export const requestAnalysisMessage: RequestMessageDefinition<FileAnalysisReques
* Answer for a successful {@link FileAnalysisRequestMessage}.
* It contains the results of the analysis in JSON format.
*
* The `idMap` of the normalization step (see {@link NormalizedAst}) is not serialized as it would essentially
* repeat the complete normalized AST.
*
* @note the serialization of maps and sets is controlled by the {@link jsonReplacer} as part of {@link sendMessage}.
*/
export interface FileAnalysisResponseMessage extends FlowrBaseMessage {
Expand Down

0 comments on commit f0642cf

Please sign in to comment.