kscripting / kscript

Scripting enhancements for Kotlin
MIT License
2.07k stars 124 forks source link

Suppressing deprecation warnings #384

Closed MagnusMG closed 1 year ago

MagnusMG commented 1 year ago

I use comment directives instead of annotations -- //DEPS instead of @file:DependsOn -- in order to make kscript work better in VSCode. And now I get warning from kscript every time I run my scripts:

[kscript] [WARN] There are deprecated features in scripts. Use --report option to print full report.

Any way of suppressing that?

aartiPl commented 1 year ago

Well, the plan is to remove comment-based annotations in the future. This is because it's not the best software engineering solution, and additionally, in the end, I want to use in kscript engine, which won't support such annotations anyway.

MagnusMG commented 1 year ago

I hope that by the time comment-based annotations are removed VSCode will have improved their handling of KScript files, but until then, being able to suppress the warning would be great.

aartiPl commented 1 year ago

This type of annotation, which is used in kscript, is just normal Kotlin: https://kotlinlang.org/docs/annotations.html#annotation-use-site-targets So, please note that it is nothing new or special just for kscript.

MagnusMG commented 1 year ago

I seem to have found a way of making the annotation style directives work in VSCode. It is here, if anybody finds this thread and wants to know.

Thanks for not giving in, aartiPI. :-)