-
Notifications
You must be signed in to change notification settings - Fork 5.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
Experiment: Remove all internal typescript code, manage bundle manually #4750
Conversation
I understand where this is coming from, nonetheless I don't like it. This would make #2180 nearly impossible because we have just one file, so we can not split ops into crates that contain both Rust and JS. A lot of future value for Also we are removing Typescript - that means we don't have any type checking on internal Deno code at all 😢. The amount bugs that typescript can catch is crazy and I would argue that no code reviewer can do the same level of static analysis. There will be bugs that TS would have caught.
What if we used a previously compiled version of deno to transpile the internal typescript code to js? It would remove the need for the special |
Can't we keep types and just check and strip them independently of the As far as being easy to understand for new contributors goes, we should go with the slow approach and not work on a SystemJS bundle. Unless there a slow way of stripping SystemJS afterwards? I'd hate to be stuck with it. Also, I remember this coming for something else long ago, why do we default to |
Tests are passing in debug mode, but hitting a segfault in release mode which might be a memory leak that is being exposed by the new structure. |
we will be pursing the removal of typescript from the internal code, but this PR isn't ready yet. We need to do a few more experiments. See the updated discussion in https://docs.google.com/document/d/1_WvwHl7BXUPmoiSeD8G83JmS8ypsTPqed4Btkqkn_-4/edit?usp=sharing |
Has anyone run the TypeScript compiler diagnostics to get a breakdown on the super slow incremental builds? We did this recently and found that a small change made incremental TypeScript builds go 6x faster. |
I ran into some similar TS problems to what Deno is experiencing when building PlatypusTS, and what I ended up doing was creating ts-bundle, which essentially builds the TS based on a references.d.ts into one file, combining the code based on namespaces. In the end you get single TS file to run through TSC. This leads to a more predictable JS output as well as a more reliable declaration file. I would never really consider this in an application/server development project, but it does work for a framework that wants to produce usable .d.ts files and minimize the additional/weird code that TS creates when you have "conflicts." |
design doc: https://docs.google.com/document/d/1_WvwHl7BXUPmoiSeD8G83JmS8ypsTPqed4Btkqkn_-4/edit?usp=sharing
incremental build time:
1m 50s -> 1m 0s
release exe size (mac):
42mb -> 41mb