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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading frontend dependencies with different loading strategies causes an exception #3677

Closed
paulroemer opened this issue Mar 9, 2018 · 0 comments
Assignees
Milestone

Comments

@paulroemer
Copy link
Contributor

With recent Flow versions a check for multiple dependency loading strategies was introduced:

07:13:35 qtp1018959698-137 2018-03-09 09:13:35 WARN [c.v.f.c.i.DependencyList] - Dependency with url frontend://components/../bower_components/polymer/lib/elements/custom-style.html was imported with two different loading strategies: EAGER and LAZY. The loading strategy is changed to EAGER to avoid conflicts. This may impact performance.
07:13:35 qtp1018959698-137 2018-03-09 09:13:35 ERROR [c.v.f.s.DefaultErrorHandler] - 
07:13:35 java.lang.IllegalStateException: Dependency with url frontend://components/../bower_components/polymer/lib/elements/custom-style.html is loaded both with LAZY and EAGER modes
07:13:35 	at com.vaadin.flow.component.internal.DependencyList.checkDuplicateDependency(DependencyList.java:94)
07:13:35 	at com.vaadin.flow.component.internal.DependencyList.lambda$add$0(DependencyList.java:76)

This information is good, but please, just log a warning. It isn't that severe that an exception should be thrown that will stop loading the whole view.

@pleku pleku self-assigned this Mar 9, 2018
pleku added a commit that referenced this issue Mar 9, 2018
It makes no sense to crash the App when developer accidentally adds the same resource with two different load modes.

Fixes #3677
pleku added a commit that referenced this issue Mar 10, 2018
It makes no sense to crash the App when developer accidentally adds the
same resource with two different load modes.
For now when duplicates are added during the same roundtrip, the more
eager load mode is used.

Fixes #3677
pleku added a commit that referenced this issue Mar 10, 2018
It makes no sense to crash the App when developer accidentally adds the
same resource with two different load modes.
For now when duplicates are added during the same roundtrip, the more
eager load mode is used.

Fixes #3677
pleku added a commit that referenced this issue Mar 10, 2018
It makes no sense to crash the App when developer accidentally adds the
same resource with two different load modes.
For now when duplicates are added during the same roundtrip, the more
eager load mode is used.

Fixes #3677
pleku added a commit that referenced this issue Mar 10, 2018
It makes no sense to crash the App when developer accidentally adds the
same resource with two different load modes.
For now when duplicates are added during the same roundtrip, the more
eager load mode is used.

Fixes #3677
gilberto-torrezan pushed a commit that referenced this issue Mar 12, 2018
* Do not crash app for using different load modes

It makes no sense to crash the App when developer accidentally adds the
same resource with two different load modes.
For now when duplicates are added during the same roundtrip, the more
eager load mode is used.

Fixes #3677
@gilberto-torrezan gilberto-torrezan added this to the 1.0.0.beta3 milestone Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants