-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Monaco.d.ts generation needs improvements #61657
Comments
@joaomoreno The implementation of the monaco.d.ts generation has changed at commit 67eacaa. I have changed it last week to no longer rely on gulp-tsb and to allow us to use const enums in our code base. The positive effects are:
The negative effects are:
I'm sorry I covered this in great detail in the Zurich standup, but I guess I don't spend nearly enough time writing on Slack as I should be. When switching branches in such a way that you go before 67eacaa, you need to restart gulp. I'm sorry about that, but that's just how this works. It is not possible to have this work in a backwards compatible way. It's like updating a node module TL;DR If switching branches in such a way that you are going back/forward in the past/future before 67eacaa you need to restart gulp watch. I am quite certain switching branches works correctly if not removing 67eacaa, i.e. if the branch is forked after 67eacaa or if 67eacaa is merged into it. So the branch switching is painful for as long as 67eacaa and previous related changes are not in the branch. I can change the ALL CAPS messages. Please feel free to propose a realistic working solution. I would love to not need to maintain a tree shaker and a custom .d.ts generation mechanism (with the goal of exposing only a subset of the source code as API). TypeScript is doing something similar with IMHO we are doing things the compiler should support: extracting a subset of our sources and a subset of classes/methods in those sources and calling them API in a |
I can build a version checking mechanism into the To make a comparison closer to home, when we updated from TypeScript 2.x to TypeScript 3.x, if you were to start gulp watch on a version where TypeScript 2.x is loaded in memory, and then you switch branches to a version of vscode where we are already using TypeScript 3.x features, you would similarly need to restart gulp watch. |
Here are the improvements I pushed today:
If you have further ideas how to completely avoid the need for |
@alexandrudima Thanks for writing this up and for the great improvements! cc @Microsoft/vscode |
The question is really about why is |
Because it is part of the compilation and for example here the type We use the same principle with the |
It seems to me, as @jrieken has pointed out before, that we got it right with In any case, good job, it seems pretty stable and quite fast now! 👏 |
For one, it's incredibly annoying when jumping between branches. It seems that I always have to restart gulp when switching branches due to
monaco.d.ts
(and nowstandaloneEnums.ts
too). We can surely do better here.Also,
monaco.d.ts
generation is hardly the most important thing in our build, why are its messages in ALL CAPS? Lets just make them play nicely with all our other messages.On top of all of this, can we perhaps find another way to do this that doesn't involve committing computed changes? It seems to me that this would be much better implemented using a continuous build check.
The text was updated successfully, but these errors were encountered: