Skip to content
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

🏗 Target VS Code 1.63 #1119

Merged
merged 4 commits into from
Aug 13, 2022
Merged

🏗 Target VS Code 1.63 #1119

merged 4 commits into from
Aug 13, 2022

Conversation

Lemmingh
Copy link
Collaborator

Summary

  • Increase the runtime requirements as planned.

  • Refactor the TSConfig.

  • Refactor the webpack configuration.

  • Reorganize the package scripts.

  • Develop a new unified build pipeline (build). I felt no need to take comprehensive frameworks, so made it from scratch.

  • Enable all recommended strict checks of TypeScript. (Remaining work of 8b09452)

  • Satisfy the compiler, with necessary refactoring and transformation, including something from 7037e0b (Replace some registerCommand with registerTextEditorCommand #1003).

  • Fix a memory leak in the src/tableFormatter.ts.

  • Update dependencies.

Performed verification

Verified at b75e001.

Warning: Accomplishing the following tasks may need about ten hours.

  • Run the defined VS Code background task "Dev - Compile". The Problems Panel should refresh and report errors in time.

  • Run the build system (npm run build) with all the environment variable combinations (2 * 2 * 2 = 8 cases). Debug to confirm correct flow and modification to webpack configs.

  • Inspect bundles and source maps.

  • Run the build/compilation.js with errors (>200 TypeScript-level semantic faults in several modules) and success respectively. Capture CPU and memory profiles. Comparing with webpack-cli, the performance difference should be less than 1% degeneration.

  • Try to develop a VS Code problem matcher which can parse the output of the build system.

  • Run vsce ls. Check the file list.

  • Confirm all kinds of breakpoints can work.

  • Confirm proper registration of dispose-handlers.

  • Edit Markdown documents with headings, bullet lists, loose ordered lists, block quotes, links, images, fenced code blocks, math areas, and tables. The behavior should be the same as before.

Remaining problems

  • Cannot launch tests locally. But after five months of unexpected busy time, obscure documents, and mysterious code, I'm afraid now I don't have enough passion to spend another three weeks in another field of infrastructure.

  • Strange patterns exist. They seem incorrect coupling, but I'm not sure, as it's too hard to reason the code.

@Lemmingh Lemmingh added the Area: Meta Pertaining to build system, test system, infrastructure, code health, and the project itself. label Apr 23, 2022
@Lemmingh Lemmingh added this to the v3.5.0 milestone Apr 23, 2022
@Lemmingh Lemmingh marked this pull request as ready for review April 23, 2022 05:13
@Lemmingh Lemmingh marked this pull request as draft April 23, 2022 05:14
@Lemmingh
Copy link
Collaborator Author

tableFormatter 里到底挖了多少坑?除了内存泄漏、莫名其妙的拆分与耦合,怎么还有虚假控制流?

这个模块比那些有几十 error 的都难修。我之前研究了一个月,这周又被迫看了 3 天。一头雾水,受够了。


I'm not able to resolve legacy bugs and merge conflicts.

@yzhang-gh
Copy link
Owner

(Have to look at this some time later)

@yzhang-gh
Copy link
Owner

Could you split this one into a few smaller ones? Then we can merge most of the changes (e.g. infra changes) soon, and I will take care of the conflicts (table formatter) later.

@Lemmingh
Copy link
Collaborator Author

Lemmingh commented May 9, 2022

I'm afraid no.

As stated in #1054 (comment) (2021-12-13), the updates to the build system, which aim to no longer deceive or hinder the compiler 1, reveal hundreds of errors, which have to be solved together.

Indeed, in order to avoid more rabbit holes, I have not been actively pushing to the master branch since I acknowledged the scale of the problem on that weekend.

Meanwhile, I've tried my best to minimize changes, and even resorted to @ts-ignore 2.

Footnotes

  1. To maximize the credibility and lay a firm foundation for automation.

    • Forbid bypassing type checking.
    • Forbid bypassing control flow analysis.
  2. For example, tableFormatter has a @ts-ignore, because the compiler is angry but I cannot understand that piece either.

@yzhang-gh
Copy link
Owner

yzhang-gh commented May 9, 2022

Alright. Just realized GitHub supports marking files as reviewed, so I don't have to do it in one go.

@Lemmingh
Copy link
Collaborator Author

Lemmingh commented May 9, 2022

Do you need some hints for the build system? You can read it in this order:

tsconfig.base.json
tsconfig.json
webpack.config.js
package.json
build/build.js
.vscode/launch.json

@yzhang-gh
Copy link
Owner

Thanks. That can be helpful. Just need to find enough time to go through it (hopefully this weekend).

@yzhang-gh
Copy link
Owner

Thanks for the great work!

I've fixed a minor bug in the table formatter as the code is not easy to read if you don't know the history.

@yzhang-gh yzhang-gh marked this pull request as ready for review August 13, 2022 05:25
@yzhang-gh yzhang-gh merged commit 432e134 into master Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Meta Pertaining to build system, test system, infrastructure, code health, and the project itself.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants