[export] JPMS module info calculation fails#5258
Conversation
There was a recent change bndtools@dd2f0c5 that took a shortcut to calculate the embedded packages unconditionally. It used the bundle class path analysis to analyze all the jars in the executable. However, this significantly slows down Eclipse but worse, it then tries to reinterpret the annotation headers. In my case, I got 3 types on the Bundle-Activator. The analysis should only be done when it is needed and I'd suggest to do it either in a separate Builder or try to analyze the manifests for speedup. This patch just makes the analysis conditional but that is a temporary fix to make it compatible with the the previous code. This needs to be cherry picked for 6.3.0 since it is a very serious regression. Fixes bndtools#5257 Signed-off-by: Peter Kriens <[email protected]>
|
@rotty3000 I will commit this once it builds so I can use 6.4.0-SNAPSHOT again. However, I think we need a better solution since it will fail for your use case as well with the multiple Bundle-Activator types caused by the use of multiple manifest annotation headers. I expect there will be more of those issues since a mechanisms is used that is clearly not intended for the purpose. I think there are faster & better ways. |
rotty3000
left a comment
There was a problem hiding this comment.
For the record this change is perfectly fine with me. Also note that I do see that the current approach has limitations that should be improved and have some ideas on how to accomplish that. Stay tuned.
It will generate errors. Bundle-Activator defined by Header annotations is one since you get the aggregate of all bundlles & jars on the runpath. I also got an error because a bundle had some stuff in the default package. Best approach imho is to use a new builder. |
|
👍
is what @bjhargrave and I thought as well. |
There was a recent change dd2f0c5 that took a shortcut to calculate the embedded packages unconditionally. It used the bundle class path analysis to analyze all the jars in the executable.
However, this significantly slows down Eclipse but worse, it then tries to reinterpret the annotation headers. In my case, I got 3 types on the Bundle-Activator.
The analysis should only be done when it is needed and I'd suggest to do it either in a separate Builder or try to analyze the manifests for speedup.
This patch just makes the analysis conditional but that is a temporary fix to make it compatible with the the previous code.
This needs to be cherry picked for 6.3.0 since it is a very serious regression.
Fixes #5257
Signed-off-by: Peter Kriens [email protected]