Skip to content

build: remove flat module bundle workaround from view engine #23826

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

Conversation

devversion
Copy link
Member

@devversion devversion commented Oct 23, 2021

Removes an old flat module bundle workaround that was needed when we
still shipped release packages with View Engine. The Angular compiler
picks the index.ts files as entry-point for the flat module bundles
(this whole flat module construct could be removed in the future anyway).

This was problematic because to avoid conflicts, the flat module out
file name was set to something unique that does not conflict with the
index file. The metadata JSON files for the ng_module targets (within our repo)
then did not reside next to the index files, but rather next to the
auto-generated flat module bundle. This broke the generation of
defineInjectable (which was used in VE as well) calls.

We worked around this in the past by patching the Angular compiler to
pick the public API file instead as entry-point; allowing us to let
the Angular compiler generate metadata and the bundle as index.js and
index.metadata.json (ensuring the release output worked then).

All of this is no longer needed with Ivy, so we can remove the
workaround and unblock angular/angular#43932
(which fails due to us patching some files in the compiler-cli package)

Removes a past flat module bundle workaround that was needed when we
still shipped release packages with View Engine. The Angular compiler
picks the `index.ts` files as entry-point for the flat module bundles
(this whole flat module construct could be removed in the future anyway).

This was problematic because to avoid conflicts, the flat module out
file name was set to something unique that does not conflict with the
index file. The metadata JSON files for the `ng_module` targets (within our repo)
then did not reside next to the `index` files, but rather next to the
auto-generated flat module bundle. This broke the generation of
`defineInjectable` (which was used in VE as well) calls.

We worked around this in the past by patching the Angular compiler to
pick the public API file instead as entry-point; allowing us to let
the Angular compiler generate metadata and the bundle as `index.js` and
`index.metadata.json` (ensuring the release output worked then).

All of this is no longer needed with Ivy, so we can remove the
workaround and unblock angular/angular#43932
(which fails due to us patching some files in the compiler-cli package)
@devversion devversion added merge safe target: rc This PR is targeted for the next release-candidate labels Oct 23, 2021
@devversion devversion requested a review from a team as a code owner October 23, 2021 17:11
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 23, 2021
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Oct 24, 2021
@wagnermaciel wagnermaciel merged commit 0fd321f into angular:master Oct 24, 2021
wagnermaciel pushed a commit that referenced this pull request Oct 24, 2021
Removes a past flat module bundle workaround that was needed when we
still shipped release packages with View Engine. The Angular compiler
picks the `index.ts` files as entry-point for the flat module bundles
(this whole flat module construct could be removed in the future anyway).

This was problematic because to avoid conflicts, the flat module out
file name was set to something unique that does not conflict with the
index file. The metadata JSON files for the `ng_module` targets (within our repo)
then did not reside next to the `index` files, but rather next to the
auto-generated flat module bundle. This broke the generation of
`defineInjectable` (which was used in VE as well) calls.

We worked around this in the past by patching the Angular compiler to
pick the public API file instead as entry-point; allowing us to let
the Angular compiler generate metadata and the bundle as `index.js` and
`index.metadata.json` (ensuring the release output worked then).

All of this is no longer needed with Ivy, so we can remove the
workaround and unblock angular/angular#43932
(which fails due to us patching some files in the compiler-cli package)

(cherry picked from commit 0fd321f)
@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 Nov 24, 2021
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 cla: yes PR author has agreed to Google's Contributor License Agreement target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants