Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in windows #76

Open
367null opened this issue Jul 10, 2023 · 14 comments
Open

Error in windows #76

367null opened this issue Jul 10, 2023 · 14 comments

Comments

@367null
Copy link

367null commented Jul 10, 2023

Screenshot 2023-07-10 143837

@367null
Copy link
Author

367null commented Jul 10, 2023

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
Copy link
Owner

@mvancanneyt may build on Windows and could solve this.

@mvancanneyt
Copy link
Collaborator

See pull request !77

@367null
Copy link
Author

367null commented Jul 11, 2023

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

@mvancanneyt
Copy link
Collaborator

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

@367null
Copy link
Author

367null commented Jul 11, 2023

@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
Copy link
Owner

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

@367null
Copy link
Author

367null commented Jul 11, 2023

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

@mvancanneyt
Copy link
Collaborator

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

  • Configure a port in both client and server
  • start paslssock server outside of VSCode.
    It's not started automatically as in the 'normal' case.

@367null
Copy link
Author

367null commented Jul 11, 2023

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

@mvancanneyt
Copy link
Collaborator

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

The standard way:

  • Indicate pasls.exe in the settings of the Pascal Language Server extension in VS Code.
    see screenshot on https://github.com/genericptr/pascal-language-server/
    instead of paslsproxy, indicate pasls (and of course specify the correct directory...)

  • If you wish to debug pasls itself, then you must

    1. indicate paslsproxy.exe in the settings of the Pascal Language Server extension.
    2. start the paslssock project in lazarus
    3. Open your pascal file in VS Code. This will start the paslsproxy program, which will connect to the paslssock project running in your lazarus IDE.

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

@367null
Copy link
Author

367null commented Jul 11, 2023

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

@mvancanneyt
Copy link
Collaborator

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.

@367null
Copy link
Author

367null commented Jul 13, 2023

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants