genericptr / pascal-language-server

LSP server implementation for Pascal
GNU General Public License v3.0
49 stars 12 forks source link

Error in windows #76

Open dsweb19778 opened 1 year ago

dsweb19778 commented 1 year ago

Screenshot 2023-07-10 143837

dsweb19778 commented 1 year ago

Hint: (lazarus) Last compile was incomplete for lspprotocol 1.0 State file="C:\Users\zzz\Documents\PascalTools\pascal-language-server\src\protocol\lib\x86_64-win64\lspprotocol.compiled" Hint: (lazarus) Last compile was incomplete for weblaz 1.0 State file="C:\lazarus\components\fpweb\lib\x86_64-win64\weblaz.compiled" Hint: (11030) Start of reading config file C:\lazarus\fpc\3.2.2\bin\x86_64-win64\fpc.cfg Hint: (11031) End of reading config file C:\lazarus\fpc\3.2.2\bin\x86_64-win64\fpc.cfg Free Pascal Compiler version 3.2.2 [2023/03/04] for x86_64 Copyright (c) 1993-2021 by Florian Klaempfl and others (1002) Target OS: Win64 for x64 (3104) Compiling weblaz.pas Hint: (11030) Start of reading config file C:\lazarus\fpc\3.2.2\bin\x86_64-win64\fpc.cfg Hint: (11031) End of reading config file C:\lazarus\fpc\3.2.2\bin\x86_64-win64\fpc.cfg Free Pascal Compiler version 3.2.2 [2023/03/04] for x86_64 Copyright (c) 1993-2021 by Florian Klaempfl and others (1002) Target OS: Win64 for x64 (3104) Compiling lspprotocol.pas (3104) Compiling PasLS.SocketDispatcher.pas C:\Users\zzz\Documents\PascalTools\pascal-language-server\src\protocol\PasLS.SocketDispatcher.pas(200,17) Error: (5005) Forward declaration not solved "constructor Create(Word);" C:\Users\zzz\Documents\PascalTools\pascal-language-server\src\protocol\PasLS.SocketDispatcher.pas(201,15) Error: (5005) Forward declaration not solved "InitSocket;" PasLS.SocketDispatcher.pas(652) Fatal: (10026) There were 2 errors compiling module, stopping Fatal: (1018) Compilation aborted Error: C:\lazarus\fpc\3.2.2\bin\x86_64-win64\ppcx64.exe returned an error exitcode Error: (lazarus) Compile package lspprotocol 1.0: stopped with exit code 1 Error: (lazarus) Compile package weblaz 1.0: terminated Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "Exit code 1" Error: (lazbuild) Project dependencies of C:\Users\zzz\Documents\PascalTools\pascal-language-server\src\standard\pasls.lpi

genericptr commented 1 year ago

@mvancanneyt may build on Windows and could solve this.

mvancanneyt commented 1 year ago

See pull request !77

dsweb19778 commented 1 year ago

@mvancanneyt I confirm the fix thanks for help its compiled successfully in my windows 11 64bit Screenshot 2023-07-11 084549

mvancanneyt commented 1 year ago

OK. It's up to Ryan to merge the changes...

dsweb19778 commented 1 year ago

@mvancanneyt

[Info - 9:16:40 AM] Connection to server got closed. Server will restart. [Info - 9:16:41 AM] Connection to server got closed. Server will restart. [Info - 9:16:41 AM] Connection to server got closed. Server will restart. [Info - 9:16:42 AM] Connection to server got closed. Server will restart. [Error - 9:16:43 AM] Connection to server is erroring. Shutting down server.

genericptr commented 1 year ago

OK I merged those changes. Please test and let me know if it works now.

dsweb19778 commented 1 year ago

@genericptr [Error - 9:16:43 AM] Connection to server is erroring. Shutting down server.

mvancanneyt commented 1 year ago

Did you start the paslsock server ? You must do 2 things for this to work:

dsweb19778 commented 1 year ago

@mvancanneyt hey i miss this, can you explain steps how to do it? am still learning pascal

mvancanneyt commented 1 year ago

There are 2 ways to use the pasls in VS Code:

The standard way:

if you are learning pascal, I suggest using the standard way :smiley:

dsweb19778 commented 1 year ago

@mvancanneyt i have already know standard way i want to know how to start paslsock server & Configure the port

mvancanneyt commented 1 year ago

It is documented in the Readme.

See the page https://github.com/genericptr/pascal-language-server/

Look in section 'Debugging the LSP server'. It details how to set the port in a config file.

The easiest way is to make sure both binaries are put in the same directory (set the output path in the "project options" dialog in Lazarus).

The config files mentioned in the above page should be in the same directory as the binaries.

Then, with paslssock open in Lazarus IDE, simply start the project. (press F9)

Alternatively, the PasLSSock.Config.pas file contains the constant
DefaultSocketPort = 9898; simply set it to the port you wish before compiling the socket server.

Do the same in PasLSProxy.Config.pas for the proxy program.

dsweb19778 commented 1 year ago

@mvancanneyt Thanks fixed all work good. wish if you can make it auto

  • It's not started automatically as in the 'normal' case