tintoy / msbuild-project-tools-vscode

VS Code extension for MSBuild intellisense (including PackageReference completion).
MIT License
82 stars 16 forks source link

In current release version of the extension language server is built in debug mode #126

Closed DoctorKrolic closed 8 months ago

DoctorKrolic commented 9 months ago

If you go to extension folder, located at <Your user folder>/.vscode/extensions/tintoy.msbuild-project-tools-0.4.9 and check language server binaries in out/language-server, you'll notice that:

  1. There are a several junk files like .exe, which isn't used by the extension and a bunch of .pdbs
  2. If you check, in what mode the main assembly was built, you'll find out, that it is not release mode

I guess, the main reason is due to how new versions of the extensions are published. I am sure this process is manual and envolves building vsix by hand. But vsix prebuild step just recompiles typescript files: https://github.com/tintoy/msbuild-project-tools-vscode/blob/a3234db38d5ca815df71128d936bfc0f01c31caf/package.json#L220 Therefore language server is packed "as is", which is the debug mode. We should add an additional script, that would rebuild language server in release mode and remove all junk files like the windows .exe entrypoint as one of vsix prebuild steps

tintoy commented 9 months ago

Yeah that sounds like a good idea; as long as we still produce symbols for it I’m fine with release-mode builds (we have historically had at least one other consumer for the language server - Eclipse). I’ll take a look tomorrow and see what I can do for the azure pipelines config.

DoctorKrolic commented 9 months ago

for the azure pipelines config.

I think, the right way to fix it would be adding an additional step for the vsix prebuild, e.g. powershell Publish-LSP.ps1 && tsc -p ./, where Publish-LSP.ps1 is a script, that publishes language server in release mod and makes sure all unneded files are deleted. This way both manual vsix build (via vsce package) and official publishing pipeline would be fixed. TBH I thought that you manually build vsix and publish it in the extensions store when writing the issue description

tintoy commented 9 months ago

I do currently but want to fix that :)