Setup to work on multiple extensions in different repositories

Hi,

I have been trying to come up with some kind of setup to be able to contribute to several projects in order to implement new features, that would require changes in each one of the dependencies.

Everything was fine, until I needed to contribute to Theia’s main repository by adding it as a submodule.

I now get the following error when building theia/master:

@theia/languages: [compile] src/browser/language-client-contribution.ts(210,13): error TS2322: Type '{ fileEvents: FileSystemWatcher[]; configurationSection: string | string[] | undefined; }' is not assignable to type 'SynchronizeOptions'.
@theia/languages: [compile]   Types of property 'fileEvents' are incompatible.
@theia/languages: [compile]     Type 'FileSystemWatcher[]' is not assignable to type 'FileSystemWatcher | FileSystemWatcher[] | undefined'.
@theia/languages: [compile]       Type 'import("/home/emaapur/projects/theia-extensions/gdb-console/theia/node_modules/monaco-languageclient/lib/services").FileSystemWatcher[]' is not assignable to type 'import("vscode").FileSystemWatcher[]'.
@theia/languages: [compile]         Type 'import("/home/emaapur/projects/theia-extensions/gdb-console/theia/node_modules/monaco-languageclient/lib/services").FileSystemWatcher' is not assignable to type 'import("vscode").FileSystemWatcher'.
@theia/languages: [compile]           Property 'ignoreCreateEvents' is missing in type 'FileSystemWatcher'.
@theia/languages: [compile] theiaext compile exited with code 2

Here is my repository of repositories: https://github.com/marechal-p/theia-cpp-debugging

edit: The goal of this repo of repos is to be able to make changes to dependencies and build them, so that it would be picked up by dependents. My issue had to do with Theia, when it came to the point where it was supposed to build it, it was failing for some reason, while no modifications were made.

My question is: Why is it failing the way it is?

[original thread by Paul Maréchal]

What are you compiling?

In this case it comes to Theia, and fails on the @theia/languages extension

the exact steps to reproduce is to run

  • yarn clean

  • yarn

  • yarn build

from the master repo (the one having the submodules)

Why would you have to change theia/languages?

(aka what are you trying to achieve?)

Just trying to build everything without asking questions, as I was afraid to hit dependencies issues if I were to selectively build some extensions from the main repo and not everything.
The end goal would be to make changes in @theia/debug and have it apply in @theia/cpp-debug from the theia-cpp-extension repo.

so you’re not changing anything in the theia source code and it doesn’t build?

precisely.

AFAIK, “yarn build” should not be necessary after “yarn” (say the instructions)

You are right if I were directly inside Theia’s repo, but I am using yarn from one level above, in the master repo pointing to Theia’s

but I can look if it makes a difference to build from Theia’s folder rather than from on top

using the following scripts so far:

ok, so building from Theia’s folder first seems to work

I wonder if its because it forgets about the other repositories dependencies…

In a perfect world I would have preferred to be able to build from the topmost root of the setup, but doing Theia first and then the others isn’t so bad, as long as its the only way to get this to work…

Thank you Thomas.

Reading this thread again, I wasn’t so clear about what it is I was doing, sorry for that.