Comments (17)
I tried, jar jar links appears to be broken.
from reflectasm.
Well IDE is your friend, it's very simple to load all ASM code into your ide and run a code refactory to change the package name. You don't really need jarjar to work.
from reflectasm.
I'd rather modify the built artifact provided by ObjectWeb than repackage it from source each time it needs updating. As you can see in the jarjar issue, I got it to work. Their docs were outdated and their launcher code half wrong.
from reflectasm.
My approach is to create a separate project that package the asm, and maintain that project including release it as a separate jar in the maven repository.
But anyway it's your call
from reflectasm.
@NathanSweet I guess pom.xml still has to be adjusted to make this work for other users and in the context of releasing to maven, right?!
from reflectasm.
@magro Yes.
from reflectasm.
We're already building/releasing a shaded jar, creating an additional artifact with a classifier attached. We could use the shading approach and just release the shaded jar instead of using jarjar (not sure how this would be integrated via maven).
from reflectasm.
Normally I would leave shading to whoever is cobbling together conflicting dependencies, but if the ASM people are saying we should shade their lib and distribute that, then I guess we don't need a non-shaded JAR.
Maven doesn't have to use jar jar, though it's possible. Can we shade it to "com.esotericsoftware.asm"?
Is it a problem for Maven that I use a shaded ASM JAR as a dependency? That means the ReflectASM source is using shaded imports.
from reflectasm.
Can we shade it to "com.esotericsoftware.asm"?
Yes we can. In the PR (#57) I left it unchanged to keep changes as small as possible, but I don't think that changing to "com.esotericsoftware.asm" would break anything (assuming nobody uses the shaded classes of course). What's your motivation btw?
Is it a problem for Maven that I use a shaded ASM JAR as a dependency? That means the ReflectASM source is using shaded imports.
That's the problem, because maven doesn't use the patched asm jar, but the original one as declared as dependency. Therefore compilation fails.
from reflectasm.
The long package name was just very long. :)
I'm fine with shading it after building the ReflectASM JAR. Next time I want to do a release for GitHub I'll probably make scar/jarjar do it.
from reflectasm.
Next time I want to do a release for GitHub I'll probably make scar/jarjar do it.
So you're not going to use mvn package
for this? Shall we set up the maven/sonatype push-to-maven-central stuff for you? It's not that much...
from reflectasm.
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
at com.esotericsoftware.reflectasm.MethodAccess.get(MethodAccess.java:120)
at com.taobao.xgraphql.annotation.AnnotationToAST.getGraphQLObjectType(AnnotationToAST.java:451)
the packed version is not released,so ....
from reflectasm.
I have done a shade in my local code:)
from reflectasm.
So you're not going to use mvn package for this?
@magro Since I'm not a Maven user, doing releases that way is asking for trouble. If it's OK with you, you can be the Maven master.
Does anything more need to be done for this isssue? Currently the ReflectASM source is using an ASM JAR repacked to com.esotericsoftware.asm. We need a new 1.11.6 Maven release (#60), so once that is done I think we can close this.
from reflectasm.
Somewhat OT for RefelctASM but, @magro since ReflectASM uses a repacked ASM, maybe we don't need to provided a shaded Kryo any more? If we do, the use case would not be about ASM, but that you had two libraries that use different versions of Kryo. In that case we would want to shade the entire Kryo lib and its dependencies.
from reflectasm.
@NathanSweet Your commit ade0542 broke the mvn build, i.e. right now it's not possible anymore for me to publish the library to maven central. I don't have the time to check out other ways of building / publishing. If you want me to publish this thing to maven central so that kryo can use a new version I see nothing else than reverting the mentioned commit and merge #57 instead (of course there we can change the package name to com.esotericsoftware.asm
).
from reflectasm.
Yep, reverting and doing the repack with Maven is fine.
from reflectasm.
Related Issues (20)
- Class versions V1_5 or less must use F_NEW frames. HOT 3
- class loaded by urlclassloader and cannot be cast to com.esotericsoftware.reflectasm.MethodAccess HOT 2
- Warning with Spring Boot 2.1.6, Java 11, and GraphQL HOT 1
- Class cannot be created (the no-arg constructor is private) HOT 1
- why FieldAccess can't get private Field? HOT 1
- Unable to access methods on the Object class HOT 3
- MethodAccess.invoke takes a lot physical memory
- java.lang.UnsupportedOperationException HOT 2
- Message about F_NEW frames when testing against version 9.1 of asm HOT 1
- Failure of test testAutoUnloadClassloaders HOT 2
- Why not support private field at FieldAccess? HOT 1
- how can i get construct with parameter by ConstructorAccess HOT 1
- Scala 3 lazy val implementation breaks FieldAccess reflection
- not work on JDK11+
- Test failures with OpenJDK17: probably ClassLoader evolutions since OpenJDK11 HOT 8
- Is it possible to invoke static method in interface
- ClassLoaderTest.testAutoUnloadClassloaders is flaky HOT 2
- java.lang.UnsupportedOperationException
- If a class has dozens or more properties, reflectasm performance is slower than java native performance HOT 1
- conflct with ASM framwork which is likes Jacoco
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reflectasm.