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

refactor(compiler-cli): optimize extra import generation in local com… #55548

Closed
wants to merge 1 commit into from

Conversation

pmvald
Copy link
Member

@pmvald pmvald commented Apr 25, 2024

…pilation mode

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pmvald pmvald force-pushed the optimize-lcm-extra-imports branch from 48e6d74 to 0fbf375 Compare April 25, 2024 21:43
@pmvald pmvald added action: review The PR is still awaiting reviews from at least one requested reviewer area: compiler Issues related to `ngc`, Angular's template compiler target: minor This PR is targeted for the next minor release labels Apr 25, 2024
@ngbot ngbot bot added this to the Backlog milestone Apr 25, 2024
@pmvald pmvald requested a review from devversion April 25, 2024 21:54
@pmvald pmvald marked this pull request as ready for review April 25, 2024 21:54
@devversion
Copy link
Member

@pmvald can you rebase and mark for merge then?

@devversion devversion added action: merge The PR is ready for merge by the caretaker action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 30, 2024
@ngbot

This comment was marked as outdated.

@AndrewKushnir AndrewKushnir removed the action: merge The PR is ready for merge by the caretaker label Apr 30, 2024
@AndrewKushnir
Copy link
Contributor

FYI, removing the "merge" label for now, please re-add when the PR is ready for merge.

…pilation mode

Currently we add global extra imports to all the files in the compilation unit. However not all the files need extra imports. For example non-Angular files definitely do not need such extra imports, and in some cases these extra imports causes problems as the file is meant to be run the Node but it has Angular dependencies which are not compatible with Node. This change tries to limit extra import generation to a subset of files. Wit hthis change we create extra imports only for the files that contain at least one component whose NgModule is in a different file. This is because all other files do not need extra imports since they are either not Angular files or they already have all the imports that the components need.
@pmvald pmvald force-pushed the optimize-lcm-extra-imports branch from 0fbf375 to aa83f09 Compare May 1, 2024 17:40
@pmvald pmvald added action: merge The PR is ready for merge by the caretaker and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels May 2, 2024
@ngbot
Copy link

ngbot bot commented May 2, 2024

I see that you just added the action: merge label, but the following checks are still failing:
    failure status "google-internal-tests" is failing

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken main, please try rebasing to main and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@pmvald
Copy link
Member Author

pmvald commented May 2, 2024

Caretaker note: p1 test failures are tool failures and unrelated to Angular as far as it shows

@pmvald pmvald added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label May 2, 2024
@AndrewKushnir AndrewKushnir added target: rc This PR is targeted for the next release-candidate target: minor This PR is targeted for the next minor release and removed target: minor This PR is targeted for the next minor release target: rc This PR is targeted for the next release-candidate labels May 2, 2024
@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit 1f2e791.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants