Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[che-dev] [Fwd: Re: Detecting newly added projects]

Moving the conversation to che-dev, I think this is such a foundational topic we need to discuss it in public.

/Thomas

-------- Forwarded Message --------
To: Fred Bricon <fbricon@xxxxxxxxxx>, Gorkem Ercan <bercan@xxxxxxxxxx>, Mario Loriedo <mloriedo@xxxxxxxxxx>, Stevan LeMeur <slemeur@xxxxxxxxxx>, Florent Benoit <fbenoit@xxxxxxxxxx>
Subject: Re: Detecting newly added projects
Date: Mon, 08 Jul 2019 10:50:07 +0200

Here's a little update:

Detects changes: Typescript, Go, Php
Does not detect changes: Java, C#, Python

I talked to Fred and it seems that there is no guidance from Microsoft saying you should or should not pick up new projects.

So while we can get Fred to merge his PR, we cannot add this capability to all languge servers out there. Therefore, if we want the language servers to up to date once we're done cloning a project at workspace startup, I see the following ways to "fix" this:

1. Use workspace roots
The idea is to open a workspace somewhere outside of /projects and then add any projects we clone as workspace roots. Note that this has a couple of consequences:
  1. It falls flat as soon as the user opens a folder by hand: we'd have to remove the file related menus from che-theia
  2. It doesn't work when the user clones a folder by hand: detecting new folders would not work because perhaps the relevant project files are not there yet when we detect the new folder. We cannot listen for project files because we do no know what they are, in the general case
  3. The "current workspace folder" means something in VS Code/Theia, so opening /projects is not the same as opening /foo  and adding /projects/bar as a workspace folder. 
2. Do a browser refresh when cloning is finished
Doing a browser refresh will restart all plugins and in consequence all language servers. We could automatically refresh the browser or pop up a notification alerting the user that he might have to do this.
3. Listen for new folders in /projects and offering the user to refresh
We need to involve the user in this, becuase we cannot detect the right point in time automatically, as I have explaind in case 1A
4. We open the IDE after the projects in the devfile are cloned. How much would this really add to the workspace startup time? Especially when we need to pull images, etc?

My personal favourite is option 2). If we think about it: VS Code has been very successful with the behaviour we're trying to fix. The case in Che is a bit different, because we're doing the "open" of the /project folder for the user, but option 2 would solve this and also educate the user to the behaviour that some of the language servers have. Generally, I don't think we're doing ourselves any favours if we paper over the fact that we are using Theia as our IDE. We'll forever chase stuff that the extension authors consider normal behaviour and we classify as bugs.

Does anyone see options?
How can we move forward on this? Do another meeting?

/Thomas



On Mon, 2019-07-01 at 15:52 +0200, Fred Bricon wrote:
We have a pending PR on the jdt.ls side to handle that case, needs some love:

On Mon, Jul 1, 2019 at 3:26 PM <tmader@xxxxxxxxxx> wrote:

On Mon, 2019-07-01 at 14:02 +0200, tmader@xxxxxxxxxx wrote:
Hi Guys,

just wanted to give you a first update on my experiments with language servers when adding a project to an openend folder in VS Code. Why VS Code? Because it's the reference implementation for a LSP client.

I'm keeping track of my experiments here: https://docs.google.com/document/d/1kou7keoXqNm4IWVYYwbD3D7-ePH8EMk9nyxXmuqIuMc/edit I'll continue experimenting with the other language servers we have.

the tldr, so far is: typescript detects new projects, python does not.

Since both extensions are from Microsoft, I guess the assumption that this is a straight up bug in jdt.ls is less likely. I'll see what the python folks think of this.


/Thomas

Back to the top