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

Add env var to skip TSC #49984

Merged
merged 2 commits into from
Feb 12, 2021
Merged

Add env var to skip TSC #49984

merged 2 commits into from
Feb 12, 2021

Conversation

scinos
Copy link
Contributor

@scinos scinos commented Feb 11, 2021

Changes proposed in this Pull Request

Adds env var to skip tsc compilation. Since #47502 we don't need to run tsc to compile the project, we only run it to provide better TypeScript typings for IDEs.

This should shave off ~40s every time we run yarn install in CI (pretty much in every build).

Update: running tsc on yarn postinstall was doing implicit typechecking, failing the build if the are TS type errors. In order to not lose this capability, I added an explicit typecheck when running unit tests.

Testing instructions

  • Smoke test live branch to ensure Calypso still compiles
  • Verify tests are green
  • Check if TeamCity builds are faster compared with trunk (note that Run unit tests will be about the same)

@matticbot
Copy link
Contributor

@scinos scinos requested a review from a team February 11, 2021 08:27
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 11, 2021
@scinos scinos self-assigned this Feb 11, 2021
@scinos scinos added the CI Continuous integration label Feb 11, 2021
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@simison
Copy link
Member

simison commented Feb 11, 2021

Does the CI run still fail if there are TypeScript errors in branch in some packages that are 100% typed?

@scinos
Copy link
Contributor Author

scinos commented Feb 11, 2021

Does the CI run still fail if there are TypeScript errors in branch in some packages that are 100% typed?

Good catch @simison ! I've changed the Run type checks step to check all projects in ./packages (like yarn install did before this PR).

@simison simison requested a review from a team February 11, 2021 12:05
@simison
Copy link
Member

simison commented Feb 11, 2021

Added Luna team as reviewer just for visibility since many 100% typed packages are from them, but feel free not to wait for any reviews. :-)

Copy link
Contributor

@griffbrad griffbrad left a comment

Choose a reason for hiding this comment

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

🚀 This is working great for me!

@ciampo
Copy link
Contributor

ciampo commented Feb 11, 2021

Does the CI run still fail if there are TypeScript errors in branch in some packages that are 100% typed?

That's my question as well — are we still going to be build errors in case of TypeScript errors?

@scinos scinos merged commit 2e834e4 into trunk Feb 12, 2021
@scinos scinos deleted the build/skip-tsc branch February 12, 2021 05:38
@scinos
Copy link
Contributor Author

scinos commented Feb 12, 2021

are we still going to be build errors in case of TypeScript errors?

Yes, ts errors in ./packages are validated as part of the Run type checks step in the mandatory Run unit tests build.

@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants