Skip to content

ngtools: listLazyRoutes() called with entryRoute normalized in non-standard way #13531

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

Closed
gkalpak opened this issue Jan 28, 2019 · 1 comment · Fixed by #13532
Closed

ngtools: listLazyRoutes() called with entryRoute normalized in non-standard way #13531

gkalpak opened this issue Jan 28, 2019 · 1 comment · Fixed by #13532
Labels
area: @ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient type: bug/fix
Milestone

Comments

@gkalpak
Copy link
Member

gkalpak commented Jan 28, 2019

🐞 Bug report

Command (mark with an x)

- [x] build
- [x] serve

Is this a regression?

N/A

Description

When ngtools callls ngProgram.listLazyRoutes() it may optionally pass an entryRoute. This route is based on entryModule.path, which is in turn resolved from _mainPath, which is in turn resolved by the custom compiler host, which normalizes paths in a proprietary way (e.g. converting Windows paths like this: C:\foo\bar --> /C/foo/bar).

This is different than how, for example, TS normalizes Windows paths (i.e. C:\foo\bar --> C:/foo/bar), which means that listLazyRoutes() implementations need to be aware of the cli normalization logic and perform similar normalization when trying to match entryRoute with their available routes.

🔬 Minimal Reproduction

🌍 Your Environment

Angular CLI: 7.3.0-rc.0
Node: 10.15.0
OS: win32 x64
Angular: 8.0.0-beta.1+28.sha-e2c98fb
... animations, common, compiler, core, forms, language-service
... platform-browser, platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.0-rc.0
@angular-devkit/build-angular     0.13.0-rc.0
@angular-devkit/build-optimizer   0.13.0-rc.0
@angular-devkit/build-webpack     0.13.0-rc.0
@angular-devkit/core              7.3.0-rc.0
@angular-devkit/schematics        7.3.0-rc.0
@angular/cli                      7.3.0-rc.0
@angular/compiler-cli             8.0.0-beta.1+39.sha-d5ded04.with-local-changes
@ngtools/webpack                  7.3.0-rc.0
@schematics/angular               7.3.0-rc.0
@schematics/update                0.13.0-rc.0
rxjs                              6.3.3
typescript                        3.2.4
webpack                           4.29.0
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Jan 28, 2019
…utes

The webpack plugin was leaking our internal Path abstraction to the Angular compiler via the `ngProgram.listLazyRoutes` call.

This Path abstraction is provided by `@angular-devkit/core` and shouldn't leak. Instead a TS-like path should be provided to the Angular program.

Fix angular#13531
@ngbot ngbot bot added this to the needsTriage milestone Jan 28, 2019
@filipesilva filipesilva added freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient labels Jan 28, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jan 28, 2019
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Jan 29, 2019
…utes

The webpack plugin was leaking our internal Path abstraction to the Angular compiler via the `ngProgram.listLazyRoutes` call.

This Path abstraction is provided by `@angular-devkit/core` and shouldn't leak. Instead a TS-like path should be provided to the Angular program.

Fix angular#13531
hansl pushed a commit that referenced this issue Jan 30, 2019
…utes

The webpack plugin was leaking our internal Path abstraction to the Angular compiler via the `ngProgram.listLazyRoutes` call.

This Path abstraction is provided by `@angular-devkit/core` and shouldn't leak. Instead a TS-like path should be provided to the Angular program.

Fix #13531
@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 Sep 9, 2019
ikjelle pushed a commit to ikjelle/angular-cli that referenced this issue Mar 26, 2024
…utes

The webpack plugin was leaking our internal Path abstraction to the Angular compiler via the `ngProgram.listLazyRoutes` call.

This Path abstraction is provided by `@angular-devkit/core` and shouldn't leak. Instead a TS-like path should be provided to the Angular program.

Fix angular#13531
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants