Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upCLI Monorepo fails to build #33659
Closed
CLI Monorepo fails to build #33659
Projects
Milestone
Comments
Closed
This comment has been minimized.
This comment has been minimized.
Was being recently playing with 9 but got that error👇🏻: here is my repo that reproduce the error https://github.com/kuncevic/angular9-multi-app |
alxhub
added a commit
to alxhub/angular
that referenced
this issue
Nov 15, 2019
Previously, the compiler assumed that all TS files logically within a project existed under one or more "root directories". If the TS compiler option `rootDir` or `rootDirs` was set, they would dictate the root directories in use, otherwise the current directory was used. Unfortunately this assumption was unfounded - it's common for projects without explicit `rootDirs` to import from files outside the current working directory. In such cases the `LogicalProjectStrategy` would attempt to generate imports into those files, and fail. This would lead to no `ReferenceEmitStrategy` being able to generate an import, and end in a compiler assertion failure. This commit introduces a new strategy to use when there are no `rootDirs` explicitly present, the `RelativePathStrategy`. It uses simpler, filesystem- relative paths to generate imports, even to files above the current working directory. Fixes angular#33659 Fixes angular#33562
gkalpak
added a commit
to gkalpak/angular
that referenced
this issue
Nov 18, 2019
Previously, the compiler assumed that all TS files logically within a project existed under one or more "root directories". If the TS compiler option `rootDir` or `rootDirs` was set, they would dictate the root directories in use, otherwise the current directory was used. Unfortunately this assumption was unfounded - it's common for projects without explicit `rootDirs` to import from files outside the current working directory. In such cases the `LogicalProjectStrategy` would attempt to generate imports into those files, and fail. This would lead to no `ReferenceEmitStrategy` being able to generate an import, and end in a compiler assertion failure. This commit introduces a new strategy to use when there are no `rootDirs` explicitly present, the `RelativePathStrategy`. It uses simpler, filesystem- relative paths to generate imports, even to files above the current working directory. Fixes angular#33659 Fixes angular#33562
alxhub
added a commit
to alxhub/angular
that referenced
this issue
Nov 18, 2019
Previously, the compiler assumed that all TS files logically within a project existed under one or more "root directories". If the TS compiler option `rootDir` or `rootDirs` was set, they would dictate the root directories in use, otherwise the current directory was used. Unfortunately this assumption was unfounded - it's common for projects without explicit `rootDirs` to import from files outside the current working directory. In such cases the `LogicalProjectStrategy` would attempt to generate imports into those files, and fail. This would lead to no `ReferenceEmitStrategy` being able to generate an import, and end in a compiler assertion failure. This commit introduces a new strategy to use when there are no `rootDirs` explicitly present, the `RelativePathStrategy`. It uses simpler, filesystem- relative paths to generate imports, even to files above the current working directory. Fixes angular#33659 Fixes angular#33562
gkalpak
added a commit
to gkalpak/angular
that referenced
this issue
Nov 19, 2019
Previously, the compiler assumed that all TS files logically within a project existed under one or more "root directories". If the TS compiler option `rootDir` or `rootDirs` was set, they would dictate the root directories in use, otherwise the current directory was used. Unfortunately this assumption was unfounded - it's common for projects without explicit `rootDirs` to import from files outside the current working directory. In such cases the `LogicalProjectStrategy` would attempt to generate imports into those files, and fail. This would lead to no `ReferenceEmitStrategy` being able to generate an import, and end in a compiler assertion failure. This commit introduces a new strategy to use when there are no `rootDirs` explicitly present, the `RelativePathStrategy`. It uses simpler, filesystem- relative paths to generate imports, even to files above the current working directory. Fixes angular#33659 Fixes angular#33562
alxhub
added a commit
that referenced
this issue
Nov 19, 2019
…3828) Previously, the compiler assumed that all TS files logically within a project existed under one or more "root directories". If the TS compiler option `rootDir` or `rootDirs` was set, they would dictate the root directories in use, otherwise the current directory was used. Unfortunately this assumption was unfounded - it's common for projects without explicit `rootDirs` to import from files outside the current working directory. In such cases the `LogicalProjectStrategy` would attempt to generate imports into those files, and fail. This would lead to no `ReferenceEmitStrategy` being able to generate an import, and end in a compiler assertion failure. This commit introduces a new strategy to use when there are no `rootDirs` explicitly present, the `RelativePathStrategy`. It uses simpler, filesystem- relative paths to generate imports, even to files above the current working directory. Fixes #33659 Fixes #33562 PR Close #33828
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Affected Package
The issue is caused by package @angular/compiler-cli or @angular/cliIs this a regression?
Yes, it used to build before Ivy.Description
Creating a new CLI project in a monorepo style, adding an application and a library, cannot build the application. It throws the same error as in #29361. It seems something about the configuration is wrong as generated by the CLI, though our project follows the same patterns and has the same errors (https://github.com/gnomeontherun/clarity/tree/angular9).
I opened a previous issue #33482 which is the same problem, but it was closed. @alxhub provided a fix, but testing his repository throws a different error so it really isn't fixed or working as far as I can tell.
Alex also has a draft of notes about some build notes here https://hackmd.io/zhu28RUcRiaG0DZq5bLy1A?view.
I made a CircleCI job that runs a few CLI commands to generate a project, manually add the library to the application, then try to build.
https://github.com/gnomeontherun/monorepo-library-errors
It has an artifact you can download with the result of the build: https://19-219057101-gh.circle-artifacts.com/0/home/circleci/project/artifact.tar
The job loads the current @next tags.
Angular Version:
Anything else relevant?