Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler plugin refactor #84

Open
JavierSegoviaCordoba opened this issue May 26, 2023 · 0 comments
Open

Compiler plugin refactor #84

JavierSegoviaCordoba opened this issue May 26, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@JavierSegoviaCordoba
Copy link
Owner

JavierSegoviaCordoba commented May 26, 2023

buildMokokiMessage currently picks the data internally from stack traces. Instead, change the signature to provide that data in a lambda. Additionally, it can be a builder with more customization options.

As a first approach, it is only necessary to change buildHeader to find the IrCall, and extract from it the necessary data:

  • fileLink
  • fileName
  • className (or top-level)
  • methodName (or top-level, scripts?)
  • lineNumber
private fun buildHeader(tagToPrint: String, priority: Priority, vertical: String) =
    "$tagToPrint$priority.$fileLink $vertical " +
        "$fileName $vertical " +
        "$className $vertical " +
        "$methodName $vertical $lineNumber"
@JavierSegoviaCordoba JavierSegoviaCordoba added the enhancement New feature or request label May 26, 2023
@JavierSegoviaCordoba JavierSegoviaCordoba self-assigned this May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant