Gert-dev / php-ide-serenata

Atom IDE package that integrates the Serenata server to provide PHP code assistance
https://serenata.gitlab.io/
Other
275 stars 22 forks source link

Installation blocked due to undefined variable in ServerManager #533

Open Mortimer333 opened 6 months ago

Mortimer333 commented 6 months ago

In my fresh installation of Pulsar I tried to install php-ide-serenata but even though my installation check resulted in positive outcome, the actual installation failed.

After fiddling with the output in Console I figured out that the property of ServerManager::versionSpecification is always undefined with results in error (can't bring the exact error but it was [TYPE_ERROR] which required the use of either Buffor, DataView or TypedArray but got undefined instead).

I worked around it by replacing unfortunate property with new Int8Array(8) at line 39 of lib/ServerManager.js which resulted in successful installation. Package now works just fine (even after undoing my changes) which made me wonder if it was actual fault on my side or if there some unexpected bug after moving to Pulsar from Atom (I checked the file history and it wasn't changed in any way that could indicate such issue).

ServerManager.js before fix:

39 |            fs.writeFile(this.getVersionSpecificationFilePath(), this.versionSpecification, (error) => {

After fix:

39 |            fs.writeFile(this.getVersionSpecificationFilePath(), new Int8Array(8), (error) => {
machitgarha commented 4 months ago

I installed the package on clean Pulsar (1.114.0), and no error occurred. Is this still relevant?

Side note: The original maintainer seems too busy (@Gert-dev). He granted me the access to this repo, but I'm not maintaining this actively (I don't have much time to do so), although I wish I could, neither I'm much familiar with Pulsar or Atom package development.

And... Sorry for the late reply.