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

Bump LKG and package.json to 5.0.0-dev.20230112 #51787

Merged
merged 2 commits into from
Jan 13, 2023

Conversation

jakebailey
Copy link
Member

@jakebailey jakebailey commented Dec 6, 2022

This PR looks huge because #51699 effectively completely rewrote tsserver.js.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Dec 6, 2022
Copy link
Member

@DanielRosenwasser DanielRosenwasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷🏻‍♂️

@jakebailey
Copy link
Member Author

jakebailey commented Dec 6, 2022

I bisected just to be sure what happened. It was #51152 that broke #49929, and then #51762 fixed it, which is confusing as I thought that was just a crash fix.

@jakebailey
Copy link
Member Author

So, maybe I just wait for #51771 to be merged before doing this.

@jakebailey jakebailey changed the title Bump LKG again Bump LKG and package.json to 5.0.0-dev.20230104 Jan 5, 2023
@jakebailey
Copy link
Member Author

jakebailey commented Jan 5, 2023

I've modified this PR to instead bump package.json to the latest nightly + an override to make our dev tooling accept TS 5.0, followed by:

$ rm -rf lib && cp -r ./node_modules/typescript/lib . && git restore ./lib/.gitattributes

Which does basically the same thing that I used to do with git checkout v4.8.4 -- lib but for a nightly build.

This has the benefit of keeping everything in sync and letting tsbuildinfo not break every time LKG changes (since it encodes a bad version from main), at the cost of not being auto-updated for patches since that would be very noisy.

I'm curious what people's opinion is of that (it's in the same spirit as my git checkout-ing, so, I kinda like it, but I also feel like we could totally forego LKG altogether).

@jakebailey jakebailey changed the title Bump LKG and package.json to 5.0.0-dev.20230104 Bump LKG and package.json to 5.0.0-dev.20230109 Jan 9, 2023
@jakebailey jakebailey changed the title Bump LKG and package.json to 5.0.0-dev.20230109 Bump LKG and package.json to 5.0.0-dev.20230111 Jan 11, 2023
@jakebailey
Copy link
Member Author

Thinking about this again, the main benefit is being able to use the new inference features in #49929 without breaking ts-eslint, since without bumping node_modules, it will use 4.9 and not have the new inference features.

@jakebailey
Copy link
Member Author

I've added a task which automates installing a new version of the nightly into package.json/node_modules and copying it to LKG:

$ hereby bump-lkg-to-nightly
Using ~/work/TypeScript/Herebyfile.mjs to run bump-lkg-to-nightly
Starting bump-lkg-to-nightly
> npm install --save-dev --save-exact typescript@next

up to date, audited 353 packages in 626ms

found 0 vulnerabilities
Finished bump-lkg-to-nightly in 922ms
Completed bump-lkg-to-nightly in 922ms

We can of course update this out of band when needed, but to bring them back in sync again, this task can be used.

Eventually per #52199 we'll drop lib entirely, in which case this won't be needed anymore.

@jakebailey
Copy link
Member Author

I'll redo this PR tomorrow once #51771 is in.

@jakebailey jakebailey changed the title Bump LKG and package.json to 5.0.0-dev.20230111 Bump LKG and package.json to 5.0.0-dev.20230112 Jan 12, 2023
@jakebailey
Copy link
Member Author

This PR should be ready for review; all needed PRs are merged in main and released in nightly.

name: "bump-lkg-to-nightly",
description: "Bumps typescript in package.json to the latest nightly and copies it to LKG.",
run: async () => {
await exec("npm", ["install", "--save-dev", "--save-exact", "typescript@next"]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hardcodes @next, but feasibly we may want (after 5.0 release) to switch to a stable build. But, I suspect that by then, we'll have deleted LKG anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably we keep manually bumping the LKG in main for now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, when required for one reason or another.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, this won't be updated in the nightly package-lock update, since they'd get out of sync, and keeping them in sync so will create loads of churn (the antithesis of what we're hoping to get out of this ordeal).

name: "bump-lkg-to-nightly",
description: "Bumps typescript in package.json to the latest nightly and copies it to LKG.",
run: async () => {
await exec("npm", ["install", "--save-dev", "--save-exact", "typescript@next"]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presumably we keep manually bumping the LKG in main for now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants