Skip to content

Compile on Save not working across multiple Eclipse projects #144

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

Open
lorenzodallavecchia opened this issue Feb 9, 2017 · 0 comments
Open

Comments

@lorenzodallavecchia
Copy link
Contributor

Compilation on save (even in the new tsserver-based implementation) does not work across multiple Eclipse projects. More precisely, if a file referenced by another project (usually with a ../ path) is modified, nothing in the depending project is rebuilt.

Note that the problem does not affect multiple tsconfig.json in the same Eclipse project. That scenario is correctly handled by tsserver, but at least one file must be open for each of the involved tsconfig.json (this is caused by #142).

However, when multiple Eclipse projects are involved, tsserver cannot solve the problem because typescript.java is running a separate tsserver instance for each Eclipse project.

There is a partial workaround for this problem (see comments in #128), but it is not applicable in general.

Considerations

I think the only solution is that the Eclipse builder must be made multi-project aware, so that a project can also be informed about the deltas of other projects that it depends on.
This is feasible (I have even half-implemented something), but not really clean because I must hard-code some of the tsconfig logic in Eclipse.

There are also other issues caused by not knowing in tsserver which paths may contain a future imported file, and so not knowing in advance which projects are needed for building another. This could be fixed by requiring the user to set Project References explicitly.

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

1 participant