You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use the modifier apply-cpp-change-to, this is its documentation:
apply-cpp-change-to: Add a function to a C/C++ source file. Each iteration adds a new function and removes the function added by the previous iteration.
But when I specify a scenario with for example apply-cpp-change-to = ["app/src/cpp/library.c"] and try to run it, I get this error:
* Settings
Project dir: ..
Output dir: profile-out-16
Profiler: none
Benchmark: true
Versions: []
Gradle User Home: gradle-user-home
Targets: [incremental_abi_change]
java.lang.RuntimeException: Could not create instance of mutator ApplyChangeToNativeSourceFileMutator
at org.gradle.profiler.mutations.FileChangeMutatorConfigurator.getBuildMutatorForFile(FileChangeMutatorConfigurator.java:42)
at org.gradle.profiler.mutations.FileChangeMutatorConfigurator.configure(FileChangeMutatorConfigurator.java:27)
at org.gradle.profiler.ScenarioLoader.lambda$loadScenarios$2(ScenarioLoader.java:216)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.gradle.profiler.ScenarioLoader.loadScenarios(ScenarioLoader.java:218)
at org.gradle.profiler.ScenarioLoader.doLoadScenarios(ScenarioLoader.java:156)
at org.gradle.profiler.ScenarioLoader.loadScenarios(ScenarioLoader.java:137)
at org.gradle.profiler.Main.run(Main.java:49)
at org.gradle.profiler.Main.main(Main.java:18)
Caused by: java.lang.IllegalArgumentException: Can only modify C++ source or header files
at org.gradle.profiler.mutations.ApplyChangeToNativeSourceFileMutator.<init>(ApplyChangeToNativeSourceFileMutator.java:12)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.gradle.profiler.mutations.FileChangeMutatorConfigurator.getBuildMutatorForFile(FileChangeMutatorConfigurator.java:37)
... 16 more
library.c is a file in our project that's used with JNI. It looks about like this:
I then renamed the file to .cpp and then gradle-profiler did actually mutate the file. It added int _m_386a15b3_dc61_408a_8c5e_054204298a4e_incremental_abi_change_7a762916_WARM_UP_1 () { } which is expected.
The text was updated successfully, but these errors were encountered:
I tried to use the modifier
apply-cpp-change-to
, this is its documentation:But when I specify a scenario with for example
apply-cpp-change-to = ["app/src/cpp/library.c"]
and try to run it, I get this error:library.c is a file in our project that's used with JNI. It looks about like this:
I then renamed the file to
.cpp
and thengradle-profiler
did actually mutate the file. It addedint _m_386a15b3_dc61_408a_8c5e_054204298a4e_incremental_abi_change_7a762916_WARM_UP_1 () { }
which is expected.The text was updated successfully, but these errors were encountered: