Skip to content

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

Merged
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:bump-lkg-2
Jan 13, 2023
Merged

Bump LKG and package.json to 5.0.0-dev.20230112#51787
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:bump-lkg-2

Conversation

@jakebailey

@jakebaileyJake Bailey (jakebailey) commented Dec 6, 2022

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤷🏻‍♂️

@jakebailey

Jake Bailey (jakebailey) commented Dec 6, 2022

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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

@jakebaileyJake Bailey (jakebailey) changed the title Bump LKG againBump LKG and package.json to 5.0.0-dev.20230104Jan 5, 2023
@jakebailey

Jake Bailey (jakebailey) commented Jan 5, 2023

Copy link
Copy Markdown
MemberAuthor

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).

@jakebaileyJake Bailey (jakebailey) changed the title Bump LKG and package.json to 5.0.0-dev.20230104Bump LKG and package.json to 5.0.0-dev.20230109Jan 9, 2023
@jakebaileyJake Bailey (jakebailey) changed the title Bump LKG and package.json to 5.0.0-dev.20230109Bump LKG and package.json to 5.0.0-dev.20230111Jan 11, 2023
@jakebailey

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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

@jakebaileyJake Bailey (jakebailey) changed the title Bump LKG and package.json to 5.0.0-dev.20230111Bump LKG and package.json to 5.0.0-dev.20230112Jan 12, 2023
@jakebailey

Copy link
Copy Markdown
MemberAuthor

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

Comment threadHerebyfile.mjs
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
Copy Markdown
MemberAuthor

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
Copy Markdown
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
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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).

Comment threadHerebyfile.mjs
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
Copy Markdown
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?

@jakebailey
Jake Bailey (jakebailey) merged commit ef81c80 into microsoft:mainJan 13, 2023
@jakebailey
Jake Bailey (jakebailey) deleted the bump-lkg-2 branch January 13, 2023 03:17
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: TeamFor Uncommitted BugPR for untriaged, rejected, closed or missing bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants

@jakebailey@DanielRosenwasser@weswigham@sandersn@typescript-bot