Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR in Symbol when compiling with Ivy in 9.0.0-next.2 #32166

Closed
116-7 opened this issue Aug 16, 2019 · 7 comments
Closed

ERROR in Symbol when compiling with Ivy in 9.0.0-next.2 #32166

116-7 opened this issue Aug 16, 2019 · 7 comments

Comments

@116-7
Copy link

116-7 commented Aug 16, 2019

馃悶 bug report

Affected Package

ngtsc

Is this a regression?

No

Description

When running normal production build with aot=true and Ivy disabled the build process completes successfully. Running with Ivy enabled results in the below error.

馃敩 Minimal Reproduction

https://github.com/davidjeliba/angular-uirouterhybrid-ivy-issue
master branch uses 9.0.0-next.2

To setup/run:

Clone project
run "yarn"
run "yarn build:production" - aot=true, ivy=false - to show successful compilation
run "yarn build:production:ivy" - aot=true, ivy=true - produces the error

馃敟 Exception or Error

WARNING in Unknown member type: "[key: string]: any;

ERROR in Symbol UIRouterModule declared in angular-uirouterhybrid-ivy-issue/node_modules/@uirouter/angular/lib/uiRouterNgModule.d.ts is not exported from @uirouter/angular-hybrid (import into angular-uirouterhybrid-ivy-issue/src/app/child.module.ts)

馃實 Your Environment

Angular Version:

Angular CLI: 8.3.0-rc.0
Node: 10.15.3
OS: darwin x64
Angular: 9.0.0-next.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, upgrade

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.0-rc.0
@angular-devkit/build-angular     0.803.0-rc.0
@angular-devkit/build-optimizer   0.803.0-rc.0
@angular-devkit/build-webpack     0.803.0-rc.0
@angular-devkit/core              8.3.0-rc.0
@angular-devkit/schematics        8.3.0-rc.0
@angular/cli                      8.3.0-rc.0
@ngtools/webpack                  8.3.0-rc.0
@schematics/angular               8.3.0-rc.0
@schematics/update                0.803.0-rc.0
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.39.2

Anything else relevant?

The change @petebacondarwin made in #31342 seems to have removed the first unknown member type warning that was also present in the 8.1.0-rc.0 example.

WARNING in Unknown member type: "[key: string]: (data: any) => void;

WARNING in Unknown member type: "[key: string]: any;

ERROR in Symbol UIRouterModule declared in angular-uirouterhybrid-ivy-issue/node_modules/@uirouter/angular/lib/uiRouterNgModule.d.ts is not exported from @uirouter/angular-hybrid (import into angular-uirouterhybrid-ivy-issue/src/app/child.module.ts)
@116-7
Copy link
Author

116-7 commented Aug 24, 2019

Still present in 9.0.0-next.3 - I have updated the example.

Also yarn build:production is now essentially the same command as yarn build:production:ivy in the example project now that Ivy is enabled by default as of next.3

@116-7
Copy link
Author

116-7 commented Oct 29, 2019

Tested on 9.0.0-next.18 and updated reproduction repo.

No warnings now, just the error as per first post.

@116-7
Copy link
Author

116-7 commented Oct 29, 2019

Probably not relevant at the moment to be an Angular issue.

@uirouter/angular issue tracking Ivy support is probably more relevant ui-router/angular#516

@116-7 116-7 closed this as completed Oct 29, 2019
@petebacondarwin
Copy link
Member

The ivy branch in the uirouter/angular repository does work with v9 now.
See ui-router/angular#516 (comment)

@petebacondarwin
Copy link
Member

But I see that the original issue is with @ui-router/angular-hybrid not @ui-router/angular. so I am reopening this while I investigate.

@petebacondarwin
Copy link
Member

This package has a separate issue from the uirouter/angular package. Working on a solution...

petebacondarwin added a commit to petebacondarwin/angular that referenced this issue Oct 30, 2019
Previously declarations that were imported via a namespace import
were given the same `bestGuessOwningModule` as the context
where they were imported to. This causes problems with resolving
`ModuleWithProviders` that have a type that has been imported in
this way, causing errors like:

```
ERROR in Symbol UIRouterModule declared in
.../@uirouter/angular/uiRouterNgModule.d.ts
is not exported from
.../@uirouter/angular/uirouter-angular.d.ts
(import into .../src/app/child.module.ts)
```

This commit modifies the `TypescriptReflectionHost.getDirectImportOfIdentifier()`
method so that it also understands how to attach the correct `viaModule` to
the identifier of the namespace import.

Resolves angular#32166
atscott pushed a commit that referenced this issue Oct 31, 2019
#33495)

Previously declarations that were imported via a namespace import
were given the same `bestGuessOwningModule` as the context
where they were imported to. This causes problems with resolving
`ModuleWithProviders` that have a type that has been imported in
this way, causing errors like:

```
ERROR in Symbol UIRouterModule declared in
.../@uirouter/angular/uiRouterNgModule.d.ts
is not exported from
.../@uirouter/angular/uirouter-angular.d.ts
(import into .../src/app/child.module.ts)
```

This commit modifies the `TypescriptReflectionHost.getDirectImportOfIdentifier()`
method so that it also understands how to attach the correct `viaModule` to
the identifier of the namespace import.

Resolves #32166

PR Close #33495
mohaxspb pushed a commit to mohaxspb/angular that referenced this issue Nov 7, 2019
angular#33495)

Previously declarations that were imported via a namespace import
were given the same `bestGuessOwningModule` as the context
where they were imported to. This causes problems with resolving
`ModuleWithProviders` that have a type that has been imported in
this way, causing errors like:

```
ERROR in Symbol UIRouterModule declared in
.../@uirouter/angular/uiRouterNgModule.d.ts
is not exported from
.../@uirouter/angular/uirouter-angular.d.ts
(import into .../src/app/child.module.ts)
```

This commit modifies the `TypescriptReflectionHost.getDirectImportOfIdentifier()`
method so that it also understands how to attach the correct `viaModule` to
the identifier of the namespace import.

Resolves angular#32166

PR Close angular#33495
mohaxspb pushed a commit to mohaxspb/angular that referenced this issue Nov 7, 2019
angular#33495)

Previously declarations that were imported via a namespace import
were given the same `bestGuessOwningModule` as the context
where they were imported to. This causes problems with resolving
`ModuleWithProviders` that have a type that has been imported in
this way, causing errors like:

```
ERROR in Symbol UIRouterModule declared in
.../@uirouter/angular/uiRouterNgModule.d.ts
is not exported from
.../@uirouter/angular/uirouter-angular.d.ts
(import into .../src/app/child.module.ts)
```

This commit modifies the `TypescriptReflectionHost.getDirectImportOfIdentifier()`
method so that it also understands how to attach the correct `viaModule` to
the identifier of the namespace import.

Resolves angular#32166

PR Close angular#33495
@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 Dec 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants