Skip to content

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

Closed

Description

@gkalpak

🐞 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

Activity

  1. added a commit that references this issue on Jan 28, 2019
    c9ea477
  2. added this to the needsTriage milestone on Jan 28, 2019
  3. modified the milestones: needsTriage, Backlog on Jan 28, 2019
  4. added a commit that references this issue on Jan 29, 2019
    d3417a4
  5. added a commit that references this issue on Jan 30, 2019
    08e2483
  6. angular-automatic-lock-bot commented on Sep 9, 2019

    @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.

  7. locked and limited conversation to collaborators on Sep 9, 2019
  8. added a commit that references this issue on Mar 26, 2024
    03b5a94
  9. added a commit that references this issue on May 29, 2026
    3073ecf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions