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

Remove code related to prepend and fix baselines #57472

Merged
merged 9 commits into from
Feb 28, 2024
Merged

Remove code related to prepend and fix baselines #57472

merged 9 commits into from
Feb 28, 2024

Conversation

sheetalkamat
Copy link
Member

  • Removes all the APIs and call related prepend and corresponding tests
  • Fixed the tests that didnt depend on prepend
  • Also fixed issue with tsserver not baselining the version as FakeMajor.FakeMinor when the callbacks were baselined by passing around the logs

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Feb 21, 2024
@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page.

Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up.

@sheetalkamat
Copy link
Member Author

Package size report

Overall package size

Before After Diff Diff (percent)
Packed 5.55 MiB 5.53 MiB -26.18 KiB -0.46%
Unpacked 30.86 MiB 30.72 MiB -143.91 KiB -0.46%

Files

Before After Diff Diff (percent)
lib/tsc.js 5.62 MiB 5.58 MiB -43.71 KiB -0.76%
lib/tsserver.js 8.24 MiB 8.19 MiB -45.31 KiB -0.54%
lib/typescript.d.ts 584.73 KiB 580.04 KiB -4.69 KiB -0.80%
lib/typescript.js 8.72 MiB 8.67 MiB -47.20 KiB -0.53%
lib/typingsInstaller.js 1.68 MiB 1.68 MiB -3.01 KiB -0.17%

src/compiler/types.ts Outdated Show resolved Hide resolved
@DanielRosenwasser
Copy link
Member

I feel a bit mixed - it's a little hard to read it casually (thanks GitHub), but what I want to know is:

  • will users still get an error message explaining why --prepend no longer works?
  • will the language service stop functioning correctly on projects using --prepend?

If the language service stops working, it means we'll be unable to browse the code of TypeScript 4.9 and earlier with TypeScript 5.5+.

@jakebailey
Copy link
Member

jakebailey commented Feb 21, 2024

If the language service stops working, it means we'll be unable to browse the code of TypeScript 4.9 and earlier with TypeScript 5.5+.

IIRC prepend only affected emit, so I would think that everything would still be browsable, but I have not checked myself.

@sheetalkamat
Copy link
Member Author

@jakebailey said it correctly.. this affects emit and it shouldnt impact the LS at all.
We do error that prepend is not supported but thats all. the actual functionality of prepending is removed now.

@jakebailey jakebailey mentioned this pull request Feb 26, 2024
@@ -813,6 +813,9 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
{
name: "verbatimModuleSyntax",
type: "boolean",
affectsEmit: true,
Copy link
Member

Choose a reason for hiding this comment

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

Does this belong in its own PR? Looks unrelated

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 was related to baseline i fixed so added it here.

Copy link
Member Author

Choose a reason for hiding this comment

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

As part of 1012104 and c871a27

@sheetalkamat sheetalkamat merged commit f23927a into main Feb 28, 2024
19 checks passed
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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants