Skip to content

toSignal's runtime error message does not get tree shaken away in prod build  #57034

Closed

Description

@Totati

Which @angular/* package(s) are the source of the bug?

core

Is this a regression?

No

Description

Creating a prod build of an app that uses toSignal keeps the error message of the runtime exception.
image

(typeof ngDevMode === 'undefined' || ngDevMode) &&

is missing from the source code.

Please provide a link to a minimal reproduction of the bug

'`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.',

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 18.0.6
Node: 20.11.0
Package Manager: npm 10.7.0
OS: win32 x64

Angular: 18.0.5
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1800.6
@angular-devkit/build-angular   18.0.6
@angular-devkit/core            18.0.6
@angular-devkit/schematics      18.0.6
@angular/cli                    18.0.6
@schematics/angular             18.0.6
ng-packagr                      18.0.0
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.4

Anything else?

As it has a comment "// This shouldn't really happen because the error is thrown on creation.", it's really just unnecessary characters.

Activity

  1. self-assigned this
    on Jul 18, 2024
  2. added
    area: core
    on Jul 18, 2024
  3. added this to the needsTriage milestone on Jul 18, 2024
  4. added a commit that references this issue on Jul 22, 2024
    b9fb98c
  5. added a commit that references this issue on Jul 22, 2024
    fe41b11
  6. added a commit that references this issue on Jul 29, 2024
    47a2b5b
  7. angular-automatic-lock-bot commented on Aug 22, 2024

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  8. locked and limited conversation to collaborators on Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: corestate: has PR

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions