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

build: Fix order for build:dev command #8840

Closed
wants to merge 1 commit into from
Closed

Conversation

mydea
Copy link
Member

@mydea mydea commented Aug 18, 2023

We actually rely on types being built before transpiling, so we cannot parallelize this - this fails if running this from an unbuilt project.

We actually rely on types being built before transpiling, so we cannot parallelize this - this fails if running this from an unbuilt project.
@mydea mydea requested review from lforst and Lms24 August 18, 2023 11:09
@mydea mydea self-assigned this Aug 18, 2023
Copy link
Member

@lforst lforst left a comment

Choose a reason for hiding this comment

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

huh, I would have thought that lerna would understand this by itself

@mydea
Copy link
Member Author

mydea commented Aug 18, 2023

Hmm, we do not "officially" depend on the types job for the transpile job 🤔 maybe we should actually change this? 🤔

@lforst
Copy link
Member

lforst commented Aug 18, 2023

Dumb question, why do we rely on types for transpilation?

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

We actually rely on types being built before transpiling

Hmm this sounds new to me. IIRC we explicitly separated type checking from transpiling to speed things up. Did this change recently? Maybe with the TS upgrade/downleveling?

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 75.19 KB (+0.46% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.17 KB (+0.2% 🔺)
@sentry/browser - Webpack (gzipped) 21.85 KB (+0.19% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 69.72 KB (+0.27% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.18 KB (+0.1% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 20.18 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 219.95 KB (+0.41% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 84.78 KB (+0.13% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 59.86 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.04 KB (+0.09% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 75.21 KB (+15.62% 🔺)
@sentry/react - Webpack (gzipped) 21.88 KB (+0.18% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 93.03 KB (+0.41% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 50.7 KB (+0.19% 🔺)

@mydea
Copy link
Member Author

mydea commented Aug 18, 2023

We actually rely on types being built before transpiling

Hmm this sounds new to me. IIRC we explicitly separated type checking from transpiling to speed things up. Did this change recently? Maybe with the TS upgrade/downleveling?

So to reproduce right now:

yarn clean:all
yarn build:dev

Results (for me) in:

 @sentry/angular-ivy:build:transpile
$ ng build
       Building Angular Package
       (node:47267) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
       (Use `node --trace-deprecation ...` to show where the warning was created)
       
       ------------------------------------------------------------------------------
       Building entry point '@sentry/angular-ivy'
       ------------------------------------------------------------------------------
       - Compiling with Angular sources in Ivy partial compilation mode.
       Compiling @angular/core : es2015 as esm2015
       Compiling @angular/common : es2015 as esm2015
       Compiling @angular/router : es2015 as esm2015
       Compiling @angular/common/http : es2015 as esm2015
       ✖ Compiling with Angular sources in Ivy partial compilation mode.
       src/errorhandler.ts:4:25 - error TS7016: Could not find a declaration file for module '@sentry/browser'. '/Users/francesco/git/sentry-javascript/packages/browser/build/npm/cjs/index.js' implicitly has an 'any' type.
         Try `npm i --save-dev @types/sentry__browser` if it exists or add a new declaration (.d.ts) file containing `declare module '@sentry/browser';`
       
       4 import * as Sentry from '@sentry/browser';
                                 ~~~~~~~~~~~~~~~~~
       src/sdk.ts:2:37 - error TS7016: Could not find a declaration file for module '@sentry/browser'. '/Users/francesco/git/sentry-javascript/packages/browser/build/npm/cjs/index.js' implicitly has an 'any' type.
         Try `npm i --save-dev @types/sentry__browser` if it exists or add a new declaration (.d.ts) file containing `declare module '@sentry/browser';`
       
       2 import type { BrowserOptions } from '@sentry/browser';
                                             ~~~~~~~~~~~~~~~~~
       src/sdk.ts:3:83 - error TS7016: Could not find a declaration file for module '@sentry/browser'. '/Users/francesco/git/sentry-javascript/packages/browser/build/npm/cjs/index.js' implicitly has an 'any' type.
         Try `npm i --save-dev @types/sentry__browser` if it exists or add a new declaration (.d.ts) file containing `declare module '@sentry/browser';`
       
       3 import { defaultIntegrations, init as browserInit, SDK_VERSION, setContext } from '@sentry/browser';
                                                                                           ~~~~~~~~~~~~~~~~~
       src/sdk.ts:31:62 - error TS7006: Parameter 'integration' implicitly has an 'any' type.
       
       31     options.defaultIntegrations = defaultIntegrations.filter(integration => {
                                                                       ~~~~~~~~~~~0m
       src/tracing.ts:11:39 - error TS7016: Could not find a declaration file for module '@sentry/browser'. '/Users/francesco/git/sentry-javascript/packages/browser/build/npm/cjs/index.js' implicitly has an 'any' type.
         Try `npm i --save-dev @types/sentry__browser` if it exists or add a new declaration (.d.ts) file containing `declare module '@sentry/browser';`
       
       11 import { getCurrentHub, WINDOW } from '@sentry/browser';
                                                ~~~~~~~~~~~~~~~~~
       src/index.ts:3:15 - error TS7016: Could not find a declaration file for module '@sentry/browser'. '/Users/francesco/git/sentry-javascript/packages/browser/build/npm/cjs/index.js' implicitly has an 'any' type.
         Try `npm i --save-dev @types/sentry__browser` if it exists or add a new declaration (.d.ts) file containing `declare module '@sentry/browser';`
       
       3 export * from '@sentry/browser';
                       ~~~~~~~~~~~~~~~~~

Maybe this is actually more an angular specific problem 🤔 I'll see if I can just fix that!

@mydea
Copy link
Member Author

mydea commented Aug 18, 2023

Replaced by #8841

@mydea mydea closed this Aug 18, 2023
@mydea mydea deleted the fn/fix-build-dev-order branch August 18, 2023 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants