Rush β€’ A new and improved way of building extensions

Not worked :pensive:

@Shreyash
I have two problems
1- Not Upgrade

M.H@MH MINGW32 ~/Desktop
$ rush upgrade
info Fetching data...
erro Something went wrong:
DioError [DioErrorType.other]: HandshakeException: Handshake error in client (OS Error:
        CERTIFICATE_VERIFY_FAILED: certificate has expired(../../third_party/boringssl/src/ssl/handshake.cc:359))
#0      DioMixin.assureDioError (package:dio/src/dio_mixin.dart:819)
#1      DioMixin._dispatchRequest (package:dio/src/dio_mixin.dart:678)
<asynchronous suspension>
#2      DioMixin.fetch.<anonymous closure>.<anonymous closure> (package:dio/src/dio_mixin.dart:586)
<asynchronous suspension>

2- :point_down: :point_down:

Try reinstalling Rush.

Do I have to delete the rush files first and then reinstall them, or do I have to reinstall directly?

Note : I tried to reinstall it directly, but it didn’t work

I will send show you the error that appeared when I open my computer

Open the dev-deps.xml file located in .idea/libraries, check the path if they exist and contain all the jar files:

2 Likes

Thanks for your reply, I will check it out and let you know.

1 Like

why does this happen to me?

1 Like

Make sure that:

  1. JDK 8 is installed.
  2. JAVA_HOME environment variable points to the correct location.
  3. %JAVA_HOME%/bin directory is listed under the Path environment variable.

I have Eclipse Adoptium jdk-17.0.2.8-hotspot, is that a problem?
the rest is all correct.

Look your path is error, I think

I double checked everything
java is working fine tho…
image

Use jdk 8 instead.

& Happy B’day !!

@Baraa_Awwad you have to use java 8 only, no other version is supported for extension development

1 Like

OK
so now I have java 8, everything is correct and java works fine and I still get the exact same error :broken_heart:

*I re-installed Rush and it works now, thanks for the help…

I’m happy that you got your solution

Wish you a Happy birthday :tada::birthday:

I can not install, (in Linux) I try this command:

and I always get an error at some point:

@avi_770, try this:

curl -fsSL --http1.1 https://raw.githubusercontent.com/shreyashsaitwal/rush-cli/main/scripts/install/install.sh | bash
1 Like

When using Integer as return type, I get java.lang.IllegalStateException

β”‚erro java.lang.IllegalStateException
β”‚               at io.shreyash.rush.util.ConvertToYailTypeKt.convert(ConvertToYailType.kt:142)
β”‚               at io.shreyash.rush.block.Property.returnType(Property.kt:77)
β”‚               at io.shreyash.rush.block.Property.asJsonObject(Property.kt:95)
β”‚               at io.shreyash.rush.InfoFilesGenerator.generateComponentsJson(InfoFilesGenerator.kt:107)
β”‚               at io.shreyash.rush.ExtensionProcessor.generateInfoFiles(ExtensionProcessor.kt:102)
β”‚               at io.shreyash.rush.ExtensionProcessor.process(ExtensionProcessor.kt:87)
β”‚               at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt:90)
β”‚               at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:188)
β”‚               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 org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:93)
β”‚               at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:31)
β”‚               at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.runAnnotationProcessing(Kapt3Extension.kt:231)
β”‚               at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:194)
β”‚               at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:102)
β”‚               at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$invokeExtensionsOnAnalysisComplete(TopDownAnalyzerFacadeForJVM.kt:112)
β”‚               at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:122)
β”‚               at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:86)
β”‚               at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:252)
β”‚               at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:243)
β”‚               at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:113)
β”‚               at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:243)
β”‚               at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:90)
β”‚               at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:56)
β”‚               at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:169)
β”‚               at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
β”‚               at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:92)
β”‚               at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
β”‚               at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
β”‚               at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76)
β”‚               at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45)
β”‚               at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227)
β”‚               at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit$default(CLITool.kt:222)
β”‚               at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:214)
β”‚               at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:271)
β”‚               at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)
β”‚               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
β”‚               at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
β”‚               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
β”‚               at java.lang.reflect.Method.invoke(Method.java:498)
β”‚               at org.jetbrains.kotlin.preloading.Preloader.run(Preloader.java:87)
β”‚               at org.jetbrains.kotlin.preloading.Preloader.main(Preloader.java:44)
β”” failed

When I checked the source code, Integer is not included in the check:

@Throws(IllegalStateException::class)
fun convert(type: String): String {
    if (type.startsWith("java.util.List")) {
        return "list"
    } else if (componentTypes.contains(type)) {
        return "component"
    }

    return when (type) {
        "boolean" -> type
        "java.lang.Object" -> "any"
        "java.lang.String" -> "text"
        "java.util.Calendar" -> "InstantInTime"
        "float", "int", "double", "byte", "long", "short" -> "number"
        "com.google.appinventor.components.runtime.util.YailList" -> "list"
        "com.google.appinventor.components.runtime.util.YailObject" -> "yailobject"
        "com.google.appinventor.components.runtime.util.YailDictionary" -> "dictionary"
        else -> throw IllegalStateException()
    }
}

I haven’t tried yet but I guess by adding integer along with other number types, the issue can be fixed. Thoughts?

Sample Code:

@SimpleProperty
fun Id(): Int? = _currentPost?.id