-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support multi-project setups in the IDE tests #5058
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
Support multi-project setups in the IDE tests #5058
Conversation
d148409
to
e7ae277
Compare
This comment has been minimized.
This comment has been minimized.
0e85f0b
to
e09075b
Compare
e09075b
to
a01eae5
Compare
a01eae5
to
fd38122
Compare
When writing IDE tests that simulate multi-project setups, we need to compile the sources of the workspaces that are depended on, because the dependent workspaces require their class files. This commit changes the `TestServer` so that workspaces that are depended on are compiled during the initialization of the server. When there are no dependency relation between workspaces, no compilation is performed.
Test workspaces should be created with the complete dependency classpath of their dependencies. The classpath was wrongly built with only the class directory of their dependencies.
This interpolator is used to defined virtual source files that will be compiled before the test starts running. Unlike virtual source files defined with `code`, the ones defined with `tasty` will not be opened in the IDE (`textDocument/didOpen` will not be sent to the LSP server). As a result, the language server will unpickle the trees from TASTY. Fixes scala#5223
fd38122
to
6751616
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! I would just rename workspace to project
Note for later: now that we have both from-source tests and from-tasty tests what would be really cool is to automatically check that we get the same results when loading from sources and when loading from tasty, in fact we could try to do this for all tests automatically: run them once with everything loaded from sources and once with everything loaded from tasty. |
Because the IDE doesn't work with multi-project setup, I haven't included any test, but here's an example: