drrb / rust-netbeans

NetBeans Rust plugin
GNU General Public License v3.0
52 stars 20 forks source link

Compilation fails using rust 1.0.0-beta #12

Closed mischkl closed 6 years ago

mischkl commented 9 years ago

Attempting to compile the plugin using "mvn package" on Mac OS X 10.10.3, using Java 8 and the newest Rust 1.0.0-beta, results in the following errors:

Changes detected. Compiling all Rust crates! Compiling crate src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs Running command: [rustc, --out-dir, target/rust-libs, src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs] src/main/rust/com/github/drrb/javarust/lib/compiler.rs:37:21: 37:30 error: failed to resolve. Use of undeclared type or module Path src/main/rust/com/github/drrb/javarust/lib/compiler.rs:37 let odir = Some(Path::new(&output_dir)); ^~~~~ src/main/rust/com/github/drrb/javarust/lib/compiler.rs:37:21: 37:30 error: unresolved name Path::new src/main/rust/com/github/drrb/javarust/lib/compiler.rs:37 let odir = Some(Path::new(&output_dir)); ^~~~~ src/main/rust/com/github/drrb/javarust/lib/compiler.rs:40:32: 40:41 error: failed to resolve. Use of undeclared type or module Path src/main/rust/com/github/drrb/javarust/lib/compiler.rs:40 let input_file_path = Some(Path::new(&request.input_path)); ^~~~~ src/main/rust/com/github/drrb/javarust/lib/compiler.rs:40:32: 40:41 error: unresolved name Path::new src/main/rust/com/github/drrb/javarust/lib/compiler.rs:40 let input_file_path = Some(Path::new(&request.inputpath)); ^~~~~ src/main/rust/com/github/drrb/javarust/lib/compiler.rs:57:33: 57:37 error: use of undeclared type name Path src/main/rust/com/github/drrb/javarust/lib/compiler.rs:57 : &Option, ^~~~ src/main/rust/com/github/drrb/javarust/lib/compiler.rs:58:33: 58:37 error: use of undeclared type name Path src/main/rust/com/github/drrb/javarust/lib/compiler.rs:58 _: &Option, ^~~~ src/main/rust/com/github/drrb/javarust/lib/highlights.rs:130:13: 130:38 error: unresolved enum variant, struct or const RequiredMethod src/main/rust/com/github/drrb/javarust/lib/highlights.rs:130 TraitItem::RequiredMethod(ref method) => { ^~~~~~~~~ src/main/rust/com/github/drrb/javarust/lib/highlights.rs:134:13: 134:38 error: unresolved enum variant, struct or const ProvidedMethod src/main/rust/com/github/drrb/javarust/lib/highlights.rs:134 TraitItem::ProvidedMethod(ref method) => { ^~~~~~~~~ error: aborting due to 8 previous errors [WARNING] java.lang.reflect.InvocationTargetException 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:483) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.RuntimeException: rustc exited nonzero (status code = 101) at com.github.drrb.rust.netbeans.build.CompileRustCrates.compile(CompileRustCrates.java:68) at com.github.drrb.rust.netbeans.build.CompileRustCrates.main(CompileRustCrates.java:49) ... 6 more

drrb commented 9 years ago

Thanks for the report

jherkel commented 9 years ago

If I understand this plugin now depends on native parsing and some unstable features (syntax::ast). With beta/release version of Rust there isn't possible to use unstable features anymore. Is there any plan how to fix this problem? For example move back to the java parsing (antlr) or wait for stabilization of syntax::ast library?

drrb commented 6 years ago

That's correct: I put the plugin on hold for a while after Rust disabled unstable features in its stable releases. I'm in the process of moving back to a Java parser (writing a new one, which will hopefully be faster than the old ANTLR one). The more advanced compilation features (error reporting, etc) will hopefully be provided by the Rust Language Server.