Skip to content

Conversation

@arturovt
Copy link
Contributor

Inlines standalone check into the message to be dropped.

image

@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Mar 10, 2025
@ngbot ngbot bot added this to the Backlog milestone Mar 10, 2025
@JeanMeche
Copy link
Member

JeanMeche commented Mar 10, 2025

Isn't that due to isStandalone not being marked as pure ? We should probably fix the root cause of that.

@arturovt
Copy link
Contributor Author

No, it's because ESBuild conservatively assumes that you might still access the variable by name somehow, either by running the code in a global scope or by appending more code to esbuild’s output.

@JeanMeche
Copy link
Member

Right, it's related to evanw/esbuild#639.

@JeanMeche
Copy link
Member

For the sake of readability wdyt of

      let errorMessage = '';
      if (typeof ngDevMode === 'undefined' || ngDevMode) {
        const standalone = !isComponentFactory && isStandalone(componentOrFactory);
        errorMessage =
          'Cannot bootstrap as there are still asynchronous initializers running.' +
          (standalone
            ? ''
            : ' Bootstrap components in the `ngDoBootstrap` method of the root module.');
      }
      throw new RuntimeError(RuntimeErrorCode.ASYNC_INITIALIZERS_STILL_RUNNING, errorMessage);

Inlines `standalone` check into the message to be dropped.
@arturovt arturovt force-pushed the refactor/core-inline-standalone-check branch from ca464b5 to 904e4f2 Compare March 10, 2025 15:45
@arturovt
Copy link
Contributor Author

Updated.

@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Mar 10, 2025
@pkozlowski-opensource pkozlowski-opensource added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 11, 2025
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit 526268c.

The changes were merged into the following branches: main, 19.2.x

AndrewKushnir pushed a commit that referenced this pull request Mar 11, 2025
Inlines `standalone` check into the message to be dropped.

PR Close #60305
@arturovt arturovt deleted the refactor/core-inline-standalone-check branch March 11, 2025 20:36
JeanMeche added a commit to JeanMeche/angular that referenced this pull request Mar 11, 2025
This fixes the test regression introduced by angular#60305
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants