-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support downloading the sources for attached felix bundles #7
Comments
Hi Roy, |
Just a note about how easy it is to implement support for the AEM ecosystem 🙃
Anyway, it will check whether the downloaded JAR matches local bundle classes and will propose decompilation in case they don't match. |
Haha tell me about it, it was fun developing the felix-bundle-extractor a few years ago ;) |
Hi, the initial implementation has been released to the EAP channel. Please update the plugin, test it, and provide feedback. |
Nice! OK, so I tried to go into an open-source bundle and said "Fetch all bundles". The message I got was the following: This should have been available though: https://mvnrepository.com/artifact/org.apache.felix/org.apache.felix.eventadmin/1.6.4 If I look at the actual jars, I see a lot of them is using sources, so not all are decompiled: It also states that 77 could not be fetched, does that mean it decompiled those ones? Or what does that mean, the message might be clearer. And If I look at them, most of them are open source as well |
Hi Roy, Regarding org.apache.felix.eventadmin:1.6.4, indeed, it should work. Maybe there was a connection issue, and the file couldn't be downloaded. If this is the case, the idea.log (Help | Open Log in Editor) should contain information about it. In the log file, search for Regarding missing sources, it means that they couldn't be downloaded and decompiled (if decompilation was allowed). Would such a message work?
I checked
We can't do anything about it. Not sure what is the reason for Unfortunately, the Fernflower decompiler can't handle some JARs. During my tests, it couldn't decompile, for example, JARs compiled from Scala sources (I guess Scala uses some non-standard bytecode instructions). Maybe this is also the case for Groovy. Unfortunately, I don't think we can do anything here. You can check in the log what the error is. It's worth mentioning that the plugin contains a manual mapping of bundle symbolic names to Maven coordinates. This mapping was required because a few open-source bundles didn't have Maven coordinates. I tried to handle it with Solr search API at https://mvnrepository.com/, but unfortunately, it didn't work reliably, hence the manual mapping. Unfortunately, it's impossible to cover all bundles, as there are many AEM versions, and many custom bundles installed. I will add logging of bundles without Maven coordinates so that users can send them to me, and I will add them to the mapping (I think that the online mapping would be nice to have so that it could be changed without new releases). |
I'm sorry about the issue with missing bundle libraries. It is probably related to obfuscating an enum used in the configuration class. I've released a new version, which skips obfuscation for this enum, but I'm not sure whether it will fix it, or reconfiguration will be needed 😞 If it still doesn't work, I suggest reverting the plugin to the older version if it blocks your work. Regarding the org.apache.felix.eventadmin:1.6.4 bundle, I noticed that one of the catch clauses in downloading method logged the exception on debug level, so maybe the error wasn't logged (I have changed it to warn in 2024.3.1-eap2; release in progress). If the issue is reproducible, you can add If there is still nothing in the logs, could you please attach here or send me via another channel this bundle file (it is open source and legal)? I will try to reproduce it on my side. My test AEM instance doesn't have the same bundle version. |
Here you go :)
|
Thanks! That was so lame bug. Fixed in 2024.3.1-eap3. Sorry for the inconvenience. BTW, I assume that bundle libraries visibility got fixed after updating to 2024.3.1-eap2. |
I assume so as well :D I'm seeing the libraries again in any case ;) |
Would there be a way to move the fetching of the sources to a background process, so that I can continue working in the meantime? |
The attached felix bundles have a pom.xml most of the times. It would be very nice if you could download the sources of the attached bundle if they are available
The text was updated successfully, but these errors were encountered: