JetBrains-Research / JetBrains-Research/CodeCocoon-Plugin

Support structured tracing of introduced modifications after transforming session finishes

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

# Description

Right now, the plugin only emits logs into stdout and idea.log file. There is no structured information of the changes made. When scaled over complex projects, the logs are hard to read.

The idea is to output structured information about modifications each transformation applies into a JSON or YAML file, so that the resulting file is parsable (similar to how a memory file is updated by modifications a transformation introduced).

For example, every transformation may operate in its own "output block" where it mentions which file is modified (e.g., an example in a JSON format):
```json
{
"project": "my-project-name",
"transformations": [
{
"transformation": "rename-class-transformation",
"changes": [
{
"file": "path/to/java/File.java",
"modifications": [
{
"position": { "line": 123, "offset": 23 }
"payload": {
"initialName": "MyClass",
"newName": "MyModifiedClass",
// etc.
}
}
]
}
]
}
]
}
```

---

**Overall, the idea is similar to how the plugin operates with the memory file; however, the purpose is to have a structured logging artifact along with plain .log-files.**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.