When running a golang repl, the program never recompiles after the first run (when it runs make build). You can bypass this by using go run . in the shell to bypass make (this is probably how it should work anyways)
When pressing “run”, the code will recompile and reflect my changes
When pressing “run”, it runes an old version of the program
Steps to reproduce:
Create a golang program.
Change the program
Recompile - You get the same result as the first comple.
I’m Japanese and I’m not good at English.
I’m sorry if my English is wrong.
I have a similar problem. ↓This Java Program can’t refresh. Example1
If this new version recompile, old version(default’s “Hello world!”) runs.
I use replit in browser, I don’t know if it’s a browser problem or a problem on the replit side.
I’m not sure if it’s related, but I’m also having the following problem:
Forking the above weird file will generate a garbled “Main.class” at the beginning.
I noticed a few things using the “javap” option.
“Main.java” in the folder cannot be directly compiled with the “Run” button, so it seems that the previous class files are still there and are being run.
The reason why “Main.class” is garbled in the above reply is probably because the class file created when the default was compiled was left and executed.
Also, after running “javac all/Main.java”, running “java all/Main” worked fine.
I’m sorry if it’s a specification that can’t be done with “javac Main.java”.
It looks like your “Main.java” file isn’t in the top-level of your Repl. If your “Main.java” file is inside a folder, or you don’t have a “Main.java” file in the root directory of your Repl, we won’t be able to run your code.
You can either:
Move the “Main.java” file to the root directory of your Repl