Rush • A new and improved way of building extensions

Getting error

Processing the extension
Unhandled exception:
FileSystemException: Cannot copy file to ‘C:\Users\varsha\AppData\Roaming\rush\workspaces\varsha.com.n.h\raw\x\varsha.com.n.h\components.json’, path = ‘C:\Users\varsha\AppData\Roaming\rush\workspaces\varsha.com.n.h\classes\simple_components.json’ (OS Error: The system cannot find the file specified.
, errno = 2)
#0 _File.throwIfError (dart:io/file_impl.dart:635)
#1 _File.copySync (dart:io/file_impl.dart:340)
#2 Generator._generateRawFiles (package:rush_cli/generator/generator.dart:45)
#3 Generator.generate (package:rush_cli/generator/generator.dart:28)
#4 BuildCommand._process (package:rush_cli/commands/build_command/build_command.dart:261)
#5 BuildCommand._compile. (package:rush_cli/commands/build_command/build_command.dart:231)

varsha@varsha-PC MINGW64 ~/Documents/RUSHAIX/rush/bin/h

Is this is the default starter extension template that you’re trying to compile? If it’s not, then it’s likely that you haven’t declared any block annotation in the extension. This is a known bug where, if there’s no block annotation declared, Rush crashes, causing the build to fail.

Edit: I’ve fixed this issue for the upcoming release.

in old version long string was working fine but now it shows this error…

Mean??
May you show post the code here. if it is a error.

1 Like

i am using Custom Encryption for verification in extension
but in old version encrypted string was working fine
but when i upgraded to latest version of rush
it got the error as shown above

1 Like

Solved using this way :joy:

1 Like

There is a limit of 65535 bytes on the length of string constants in Java. This also applies to method and field names. From what I can see in your screenshot, the length of your string, most probably, exceeds that limit, and hence the error.

I’m not really convinced with this. Rush doesn’t interfere with or try to modify the behavior of the Java compiler in any way. It’s most likely that the size of your string constant might have increased without you noticing it given that you’re using some custom encryption techniques.

1 Like

i’ll share about this later

I’ve downgraded to v.1.0.1 from latest version

but i got this error when building extension

Is there any way to completely uninstall Rush so that i can reinstall the old one perfectly

also as i said in new version long length string is not working fine…
I’m posting this from my pc which have old version of rush
and in that it worked fine

1 Like

You never mentioned what version of Rush you’re using, so, it was natural for me to assume it to be the v1.1.1. Anyways, back during v1.0.1, unlike today, Rush used Apache Ant for compiling your extension’s Java sources. And maybe, that’s why your extension compiled just fine w/o any errors. I’m not really sure how Ant deals with your code while compiling it, but if what you’re saying is true, chances are it has some sort of mechanism (maybe?) to handle such scenarios.

1 Like

yes may be! so if it can be solved its humble request to solve it asap!
I can share the piece of code with you which i’m trying to compile if you want
Also it there any way to completely uninstall rush v1.1.2
so that i can reinstall v1.0.1

  • Type %appdata% into your File Explorers “address bar”
  • Hit enter (:smirk:)
  • Delete the Rush directory
  • Run the v1.0.1 installer instead
  • Select the location you previously selected to install Rush in
    • It will overwrite the old rush.exe.
1 Like

already did this but got error shown in image shared above

i’m sorry i’ve deleted temp and rush folder then updated
let me try your method

So you got an error in v1.0.1, and want to downgrade to v1.0.1?

no i want to downgrade from 1.1.2 to 1.0.1

Not worked :frowning_face:

Nope, I don’t think it’s a good idea to tamper with the users’ code (if that’s how Ant does it). Also, this isn’t a problem with Rush – it’s just how Java works.

the same string worked fine when used in simple java program
but not working when building extension

PM me your string and I’ll be more than happy to test that.