-
Notifications
You must be signed in to change notification settings - Fork 9
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
Filtering the dependencies to be considered during the vaadinPrepareFrontend task. #120
Comments
Hi, Would you add some log output regarding the scanning that Vaadin does. Something like "Visited {} classes. Took {} ms." You can also maybe use blacklist/whitelist to define what gets scanned: cheers, |
Hi all, couple of thoughts:
|
Unfortunately the class processing happens internally in the That being said, the Gradle plugin dumps the set of jar files to be sent to |
The API proposal: the build.gradle.kts snippets could look like the following: vaadin {
filterClasspath {
include("com.vaadin:*")
exclude("org.slf4j:*")
exclude("commons-codec:commons-codec")
}
} The @jwn-css what do you think? |
@caalador What do you think, would it be feasible (what Martin suggested)? I don't know if we know anything about artifactId or groupId in the right place 🤔 |
@pleku checked briefly and it looks like it might be possible: https://github.com/vaadin/spring/blob/master/vaadin-spring/src/main/java/com/vaadin/flow/spring/VaadinServletContextInitializer.java#L565 We should create a cleaner enhancement issue to the flow repository. |
@mstahv not sure what you mean 🤔 I believe the only place to implement a groupId/artifactId-based filtering is the Plugin code itself; at runtime the groupId/artifactId information is lost and not available. I am prototyping the solution code in the Plugin code itself, it should be ready by tomorrow 👍 |
@mvysny I thought the discussion was on how to make it happen for Spring Boot where it is very slow to scan things 😄 I'm afraid the plugin code itself is not a full solution for all of the scanning, but it is a start. It would make sense to make it work for all occasions and not have different API/implementation for different technologies. But maybe testing it first with the gradle plugin is the best way to get forward and then expand based on the experience there 👍🏻 |
@pleku i see, thank you for the explanation. The customer explicitly mentioned the @jwn-css the support for artifact filtering is implemented in the PR #125 . Could you please try out the new plugin whether it works for you? You can find the new documentation at https://github.com/vaadin/vaadin-gradle-plugin/blob/feature/120-filter-dependencies/README.md ; then check out the branch to your machine and use the plugin with your project by taking advantage of Gradle composite builds as documented at https://github.com/vaadin/vaadin-gradle-plugin/blob/14.x/CONTRIBUTING.md |
I'll take a look and get back to you if it works for us. |
I was able to test it yesterday. It seems to fit our requirements exactly. We were able to drastically reduce the execution time and packages that are looked at: Previously: Now: |
Wow, thank you for letting me know. That's a speed improvement of over 20x; the speedup comes directly from constructing |
Since the PR has been verified, I'll merge the PR and release a new plugin version. |
The new plugin has been released, please try it out: the 0.14.7.5 version 👍 |
Will the feature be transferred to the newer versions (23.x) as well? |
The feature should be there; if not, please open a feature request at https://github.com/vaadin/flow/issues |
Is your feature request related to a problem? Please describe.
If the number of dependencies of the project is very large and the types of dependencies are very different, the execution of the vaadinPrepareFrontend task can take a relatively long time.
Describe the solution you'd like
Filtering on specific file names or extensions would be helpful, if only to reduce the number of dependencies to consider.
Describe alternatives you've considered
Alternatively, it is possible to partially exclude the task and execute it only when needed. However, it is then inevitably necessary that all participants in the project know exactly what the background of the task is and when one must execute the task and when not.
Additional context
It would be very helpful if this feature, if considered, would also be included in the version for the current LTS i.e. Vaadin 14.
The text was updated successfully, but these errors were encountered: