Comments (3)
This feature is very welcomed! We're currently using the tracing agent together with our test suite to automatically pick up all use of reflection (which is somewhat error prone if low test coverage). This new feature in combination with the tracing agent would eliminate all reflection related runtime errors we get. So it'd be nice if it's made to work seamlessly together.
from native-build-tools.
Looks promising. A couple questions/suggestions.
- Is it possible to combine filters? E.g. Only package
org.example.foo
from dependencyorg.example:bar:*
? - If you know you only need constructors, is it possible to only add them for an entire package?
- Is it possible to provide a custom filter to the plugin? A
Predicate<Class>
andPredicate<Executable>
for example? - Is it possible to still specify a
"typeReachable"
condition on the generated entries?
A specific use-case I have now, for which I have a Feature
with a subtype reachability handler:
For all subclasses of Foo
Register all methods prefixed with create*
with a matching return type and parameter list.
Which is extremely specific I guess. I'd imagine specifying a custom filter class in the lines of this, which is still missing the "typeReachable"
part:
class CustomFilter implements PluginFilter {
@Override
boolean includeClass(Class<?> clazz) {
return Foo.class.isAssignableFrom(clazz);
}
@Override
boolean includeMethod(Method method) {
return method.getName().startsWith("create"); // + check returntype & parameter types
}
@Override
boolean includeConstructor(Constructor<?> cconstructor) {
return false;
}
@Override
boolean includeField(Field field) {
return false;
}
}
from native-build-tools.
@kristofdho this is possible, we need to be careful not to duplicate too much of functionality. Such fine-grained adjustments can currently be done with Native Image features.
from native-build-tools.
Related Issues (20)
- With autodetection enabled, `generateTestResourceConfig` should look at processed test resources only
- "multi-project-with-tests" can not be compiled
- Cast issue when bumping from 0.9.28 to 0.10.0 HOT 4
- The junit-native does not support org.junit.rules.ExpectedException. HOT 2
- `metadata-copy` should follow recommendation HOT 2
- Native Image Agent Uses `JAVA_HOME` Instead of `GRAALVM_HOME`
- Gradle plugin can't find gu.cmd in GraalVM JDK 21 HOT 1
- Annotation processor support for generating reflect-config.json
- Sending SIGINT to an agent run does not collect the JSON files correctly HOT 1
- Error: Main entry point class 'com.example.Application' neither found on classpath (spring boot maven multiple submodule)
- Unable to configure `configurationFileDirectories` for task `nativeCompile` HOT 1
- ./gradlew -Pagent run fails with Error: could not open `C:\Program Files\Java\graalvm-jdk-21.0.2+13.1\lib\svm\bin\.native-image-configure.exports' HOT 2
- Add some resiliency to the collection of reachability metadata HOT 8
- JUnit class initialization error HOT 2
- native-maven-plugin >= v0.9.26: Build fails due to graal_isolate.h not being put into target folder HOT 4
- Native Image Maven Plugin should include provided dependencies for testing
- Unable to execute nativeTest under Junit 5.11.0-M2 HOT 3
- [QUESTION] nativeTest with runtime arguments? HOT 1
- The build of the task `:native-gradle-plugin:functionalTest` in the master branch failed HOT 1
- The build of the task `:native-gradle-plugin:functionalTest` in the master branch failed in Oracle GraalVM For JDK 23.ea.13 HOT 4
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 native-build-tools.