GithubHelp home page GithubHelp logo

Comments (21)

olegklimov avatar olegklimov commented on May 29, 2024

@digital-phoenix that's a blocker for any other testing at this point :/

Kirill @reymondzzzz might help you, but he doesn't have windows either, only a virtual machine that's not ideal for debugging things like that one.

from refact-vs-classic.

digital-phoenix avatar digital-phoenix commented on May 29, 2024

@olegklimov would it be possible to upload the output window data as an external file? Also if you comment out line 150 "info.CreateNoWindow = true;" in RefactLanguageClient.cs do you see a server window pop up at all?

from refact-vs-classic.

reymondzzzz avatar reymondzzzz commented on May 29, 2024

Guys, I found commit in lsp binary. This commit broke rpc requests. I will try to fix it ASAP

from refact-vs-classic.

reymondzzzz avatar reymondzzzz commented on May 29, 2024

So after 6 hours debug I found reason why it doesn't work. For completion we need text of file and we save it in cache in rust with didOpen/didChanged events. Your code did completion before this events(another ide did event and after call completion). And rust throws exception and rust fall down with panic before and your code restarts rust and call didChange event. After works ok. Oleg found bug with blocked http server. This bug in rust which lsp started in main thread and blocked http server startup. I moved lsp in another thread. It works. So.... My bugfix didn't restart lsp thread and another events doesn't work because thread has panic.

What we need to do:

  • You need rework code with right order of event didChange/didOpen -> completion
  • I need to fix lsp panic with exception. Thread will restart never with any exception.

from refact-vs-classic.

digital-phoenix avatar digital-phoenix commented on May 29, 2024

@reymondzzzz I believe the latest pull request solves the problem

from refact-vs-classic.

reymondzzzz avatar reymondzzzz commented on May 29, 2024

this? #22 You add only stderr-log in args of rust? how it helps?

from refact-vs-classic.

digital-phoenix avatar digital-phoenix commented on May 29, 2024

@reymondzzzz when I tested it without that addition the rpc call would hang indefinitely and with the code added the rpc call worked correctly.

from refact-vs-classic.

digital-phoenix avatar digital-phoenix commented on May 29, 2024

@reymondzzzz if you still see have the issue even with the pull request let me know what file type you're testing with.

from refact-vs-classic.

reymondzzzz avatar reymondzzzz commented on May 29, 2024

It still doesn't work.

// main.cpp

#include <stdio.h>
#include <stdlib.h>


int ma

I try to complete main

from refact-vs-classic.

digital-phoenix avatar digital-phoenix commented on May 29, 2024

@reymondzzzz Can you see if a c# file works better?

from refact-vs-classic.

reymondzzzz avatar reymondzzzz commented on May 29, 2024

same

using System;

namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine

from refact-vs-classic.

reymondzzzz avatar reymondzzzz commented on May 29, 2024

How --logs-stderr helps? it's only redirect stderr in stdout.

from refact-vs-classic.

reymondzzzz avatar reymondzzzz commented on May 29, 2024

@digital-phoenix take this pr smallcloudai/refact-lsp#55 for lsp. It fixes this problem, but log has errors. Fix pls event order bug.
image

from refact-vs-classic.

digital-phoenix avatar digital-phoenix commented on May 29, 2024

@reymondzzzz I couldn't reproduce the issue you're seeing but I resolved some potentially related issues.

from refact-vs-classic.

reymondzzzz avatar reymondzzzz commented on May 29, 2024

Check events. Order is broken. Fix it pls

from refact-vs-classic.

olegklimov avatar olegklimov commented on May 29, 2024

🎉 🎉 🎉 we're moving forward 🎉 🎉 🎉

from refact-vs-classic.

digital-phoenix avatar digital-phoenix commented on May 29, 2024

@reymondzzzz the order of events is correct. This is accomplished in one of two ways. Either the lsp will recognize the extension of a file type and the lsp server will automatically launch. Then the visual studio sdk will handle the server messages automatically. Failing an automatic launch the lsp server will be manually launched and every time the lsp is asked for a completion the code will first check to see if the lsp knows about the file. If it doesn't it will send a didOpen message to the server and create a change handler that will send updates to the lsp whenever the file changes.

Can you make sure to update to your code with the latest pull request and send a file containing all the info from the output window and another file containing all the server output?

from refact-vs-classic.

digital-phoenix avatar digital-phoenix commented on May 29, 2024

@reymondzzzz let me know if the server still receives getCompletion calls with the latest pull request

from refact-vs-classic.

reymondzzzz avatar reymondzzzz commented on May 29, 2024

I'm trying it.

from refact-vs-classic.

reymondzzzz avatar reymondzzzz commented on May 29, 2024

@digital-phoenix with last commits it works correct. Great job!

from refact-vs-classic.

olegklimov avatar olegklimov commented on May 29, 2024

OK, it still dies, but less often. It looks like rust doesn't validate inputs very well, and panics again (hypothesis, need to check).

The current problem for this issue is this: the exception between AAA1 and AAA2 doesn't get caught by "catch (Exception)" and doesn't go to the status bar. Maybe there's some kind of a more wide exception, like BaseException in python?

There are two things to fix:

  • panic
  • show error to user

Panic we'll fix elsewhere, but the lack of an error message is what makes this issue much worse -- it looks like it works, but it doesn't.

To reproduce error: start writing new code at the end of any file => lsp will die very soon.

from refact-vs-classic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.