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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃彈馃悰 Do not generate code during gulp check-types #16799

Merged
merged 1 commit into from Jul 17, 2018
Merged

馃彈馃悰 Do not generate code during gulp check-types #16799

merged 1 commit into from Jul 17, 2018

Conversation

rsimha
Copy link
Contributor

@rsimha rsimha commented Jul 17, 2018

With this PR, we no longer generate code during gulp check-types. Specifically, all these files are no longer written to the dist/ folder:

rsimha@rsimha-macbookpro2 (master):~/src/amphtml$ ls -lar dist/
total 15384
-rw-r--r--   1 rsimha  primarygroup   327472 Jul 17 10:25 integration-check-types.js.map
-rw-r--r--   1 rsimha  primarygroup   172418 Jul 17 10:25 integration-check-types.js
-rw-r--r--   1 rsimha  primarygroup    37574 Jul 17 10:25 iframe-transport-client-check-types.js.map
-rw-r--r--   1 rsimha  primarygroup    16709 Jul 17 10:25 iframe-transport-client-check-types.js
-rw-r--r--   1 rsimha  primarygroup  4144583 Jul 17 10:25 check-types.js.map
-rw-r--r--   1 rsimha  primarygroup  3070012 Jul 17 10:25 check-types.js
-rw-r--r--   1 rsimha  primarygroup    63058 Jul 17 10:25 ampcontext-check-types.js.map
-rw-r--r--   1 rsimha  primarygroup    27957 Jul 17 10:25 ampcontext-check-types.js
drwxr-xr-x  50 rsimha  primarygroup     1600 Jul 17 10:25 ../
drwxr-xr-x  10 rsimha  primarygroup      320 Jul 17 10:25 ./

Notes:

  • I've confirmed that type errors are still correctly detected with this change
  • The original issue suggests that we no longer run SIMPLE_OPTIMIZATIONS during type checking, but it turns out that we can't use WHITESPACE_ONLY optimization according to this comment:
    if (argv.typecheck_only || checkTypes) {
    // Don't modify compilation_level to a lower level since
    // it won't do strict type checking if its whitespace only.
    compilerOptions.compilerFlags.define.push('TYPECHECK_ONLY=true');

Fixes #5024

@rsimha rsimha self-assigned this Jul 17, 2018
@rsimha
Copy link
Contributor Author

rsimha commented Jul 17, 2018

/to @erwinmombay @cramforce

@codecov-io
Copy link

Codecov Report

Merging #16799 into master will increase coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #16799      +/-   ##
==========================================
+ Coverage   78.01%   78.06%   +0.04%     
==========================================
  Files         558      558              
  Lines       40440    40440              
==========================================
+ Hits        31551    31571      +20     
+ Misses       8889     8869      -20
Flag Coverage 螖
#integration_tests 35.14% <酶> (+0.28%) 猬嗭笍
#unit_tests 77.11% <酶> (+0.05%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update f1405b9...b16bf4d. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants