magik-tools-0.10.0 released
August 1, 2024 SonarQube static code analysis magik-language-server magik-debug-adapter
Magik tools 0.10.0 has been released! This release includes many fixes, a few new checks, extended existing functionality, and added new functionality.
The following new checks have been added:
unsafe-evaluate-invocationto test for unsafeunsafe_evaluate()method calls.sw-char16-vector-evaluate-invocationto test forsw:char16_vector.evaluate()method calls.deprecated-type-usage(typed check) to mark usage of deprecated type.deprecated-method-usage(typed check) to mark usage of deprecated methods.
Next to the marking usage of deprecated types/methods, the semantic token provider (syntax highlighting) also marks the usage of deprecated types/methods.
Another highlight is the ability to let magik-lint automatically fix errors, in some cases. Currently, some formatting errors can be automatically fixed. For example:
show(1,2,3)
Can be automatically fixed to:
show(1, 2, 3)
Support for module.def and product.def has been improved. Now it provides functionality comparable to the Magik editor support. This includes:
- Providing semantic tokens (syntax highlighting)
- Folding of blocks
- Hovering on products and modules
- Providing definitions of products and modules
- Providing references of products and modules
- More robust grammar to prevent errors
The storage of types/methods/… has been overhauled to be more robust. The old type model was written during a prototype, a long time ago. For that time, it was sufficient. But as time progresses, other needs arise and bugs become more apparent. Thus, a rewrite was necessary.
Also, to speed up starting/initializing of the language server, dumping on shutdown and loading on startup of the type database has been added to the language server. Now, it only has to re-index the files that were changed, compared to the last dumped type database. This severely improves startup time.
The full list of changes can be found in the change log.