ant-druha / intellij-powershell

Adds PowerShell language support to IntelliJ-based IDEs.
https://plugins.jetbrains.com/plugin/10249-powershell
Apache License 2.0
71 stars 20 forks source link

Improve the way we determine/parse a module version #196

Open ForNeVeR opened 6 months ago

ForNeVeR commented 6 months ago

See the code near this line: https://github.com/ant-druha/intellij-powershell/blob/baccc65fb41e834e8eb66642911f1a1259926856/src/main/kotlin/com/intellij/plugin/powershell/ide/run/PSExecutionUtil.kt#L32

This is used by the plugin to determine the version of the PowerShellEditorServices module.

Currently the code is very simple, maybe even too simple: if the module authors decide to write its version in a minimally more convoluted way, it will certainly break.

Ideally, we should maybe navigate the PSI or something. Or maybe totally migrate to determining this version asynchronously by starting PowerShell.

Why do we even need that? So many questions…