You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the project name resolves to the "wch-site-application-e2e" project instead of the "wch-site-application" as expected.
I expected it to resolve to "wch-site-application" because this has been set as the default project.
The reason for this seems to be that both projects use the empty string for their root folder mapping.
Is this an incorrect setup? Why?
It looks like the method "getProjectByPath" in "angular_devkit\core\src\workspace\workspace.ts" returns this information. Probably because the ".sort((a, b) => isInside(a[0], b[0]) ? 1 : 0);" operation does not perform a stable sort.
Why is this sorting done, anyway, instead of just using the value of the "defaultProject"?
Desired functionality
In the example above I would expect "wch-site-application" to be returned or to learn why the current configuration is not valid.
The text was updated successfully, but these errors were encountered:
Bug Report or Feature Request (mark with an
x
)Area
Versions
v8.11.2
6.1.0
Repro steps
In a custom schematic I specify the project parameter in the schema.json like so:
When executing "ng add" with that schematic in a project with the following
angular.json
file:the project name resolves to the "wch-site-application-e2e" project instead of the "wch-site-application" as expected.
I expected it to resolve to "wch-site-application" because this has been set as the default project.
The reason for this seems to be that both projects use the empty string for their root folder mapping.
Is this an incorrect setup? Why?
It looks like the method "getProjectByPath" in "angular_devkit\core\src\workspace\workspace.ts" returns this information. Probably because the ".sort((a, b) => isInside(a[0], b[0]) ? 1 : 0);" operation does not perform a stable sort.
Why is this sorting done, anyway, instead of just using the value of the "defaultProject"?
Desired functionality
In the example above I would expect "wch-site-application" to be returned or to learn why the current configuration is not valid.
The text was updated successfully, but these errors were encountered: