Rush • A new and improved way of building extensions

why showing this error. i’m not any changes with Pitagoras.java

error code :

Compiling sources
│ info Picked 2 source files
│ erro src\com\Pitagoras\PitagorasTest.java:3: package org.junit.jupiter.api does not exist
│ import static org.junit.jupiter.api.Assertions.*;
│ ^
│ erro src\com\Pitagoras\Pitagoras.java:44: cannot find symbol
@SimpleProperty(category = PropertyCategory.BEHAVIOR)
│ ^
│ symbol: method category()
│ location: @interface SimpleProperty
│ erro src\com\Pitagoras\Pitagoras.java:49: cannot find symbol
@SimpleProperty(category = PropertyCategory.BEHAVIOR)
│ ^
│ symbol: method category()
│ location: @interface SimpleProperty
│ Picked up _JAVA_OPTIONS: -Xmx1024m
└ failed

• Build failed [1s 962ms] [3 errors]
PS C:\Users\hp\Desktop\cardview\pitagoras>

Hi @Edu_boy , It seems that you’re doing all things blindly. You have just copied the code and pasted in your file without knowing it. I will suggest to understand the code first that you have copied from wherever. And you couldn’t use @DesignerComponent and @SimpleObject in rush as you must provide these details in metadata file(rush.yml), you could find it here. You should read the first post closely to understand the rush or you can refer to the wiki.

2 Likes

Yes sorry i should have told this so, i just reinstalled rush and it started recognizing it was maybe problem with path var

how i solved this problem

2 Likes

Hey shreyash, I deleted a class file (not the main extension one) but rush is including the deleted file with the compiled extension also. I can confirm this issue, just create a new project with one dummy class to test, once build it, and everything is okay, now after deleting the dummy file, the class is still getting compiled along, not sure this is an issue from my side or from rush.

Apparently, it’s Rush. But for the time being, rebuilding with the -r (--release) flag should fix this.

1 Like

Rush doesn’t compile when there are Korean characters or non-English letters are used in the Java file.

unmappable character for encoding Cp1252

@Shreyash its again doing build failed

Also again javac did not recognized i solved it yesterday now its again doing

Thanks for reporting, will be fixed in the next update.


There you have your answer.

3 Likes
┌ Compiling sources
│ info Picked 1 source file
│ erro java.lang.IllegalStateException
│               at io.shreyash.rush.util.ConvertToYailTypeKt.convert(ConvertToYailType.kt:142)
│               at io.shreyash.rush.block.Block.returnType(Block.kt:43)
│               at io.shreyash.rush.block.Method.asJsonObject(Method.kt:62)
│               at io.shreyash.rush.InfoFilesGenerator.generateComponentsJson(InfoFilesGenerator.kt:103)
│               at io.shreyash.rush.ExtensionProcessor.generateInfoFiles(ExtensionProcessor.kt:102)
│               at io.shreyash.rush.ExtensionProcessor.process(ExtensionProcessor.kt:87)
│               at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
│               at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
│               at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
│               at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
│               at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
│               at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
│               at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
│               at com.sun.tools.javac.main.Main.compile(Main.java:523)
│               at com.sun.tools.javac.main.Main.compile(Main.java:381)
│               at com.sun.tools.javac.main.Main.compile(Main.java:370)
│               at com.sun.tools.javac.main.Main.compile(Main.java:361)
│               at com.sun.tools.javac.Main.compile(Main.java:56)
│               at com.sun.tools.javac.Main.main(Main.java:42)
└ failed

• Build failed [1s 348ms] [1 error]

I dont think this is cause of error in my code?

I got this error when I used a class/type that is not available as a method params or return type.

2 Likes

I’ve successfully installed latest version of rush on windows 11. When I’m trying to create an extension with “rush create testextension” then it’s asking about language after few steps then I can’t select language with arrow keys. That’s why I can’t use rush with latest version of rush.

When fresh install “Rush” restart your terminal

I’ve tried with git and cmd, powershell etc, but same problem

I have got it i returned double as param in @SimpleEvent .
I am going a little #off-topic here sorry for that :sweat_smile:

So is there any way to return double in @SimpleEvent

I remembered double should be supported, haven’t tried yet

1 Like

I have removed double but still the same error come

As already mentioned, double is supported in extension. So removing double will not solve your error. It seems by your error that you have returned something that is not supported. You should check all the returnable properties and methods.

1 Like

Thanks for the reply i’ve found that i returned ArrayList<String> in @SimpleFunction also i have added public ArrayList getList(){ }

1 Like

I haven’t read about writing tests for extensions anywhere. Wouldn’t be great if you could implement something related to testing in rush.

4 Likes

Testing support was something I had on my mind since the initial days of Rush but considering how many users would actually utilize it, I have completely removed it from the roadmap. I might consider adding it if more users are interested.

5 Likes