drrb / rust-netbeans

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

Doesn't package #16

Closed azazar closed 6 years ago

azazar commented 7 years ago

Output:

$ rustc --version
rustc 1.13.0-nightly (a059cb2f3 2016-09-27)
$ mvn package
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Rust NetBeans Plugin 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- build-helper-maven-plugin:1.9.1:add-source (compile-build-addon) @ rust-netbeans ---
[INFO] Source directory: /home/azazar/Private/Projects/rust-netbeans/src/build/java added.
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ rust-netbeans ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 22 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ rust-netbeans ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- exec-maven-plugin:1.3.2:java (compile-rust-bridge) @ rust-netbeans ---
[WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6.
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]
error[E0432]: unresolved import `rustc::middle::ty::CtxtArenas`
 --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:2:5
  |
2 | use rustc::middle::ty::CtxtArenas;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `ty` in `rustc::middle`

error[E0432]: unresolved import `syntax::ast_map::Forest`
  --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:15:5
   |
15 | use syntax::ast_map::Forest;
   |     ^^^^^^^^^^^^^^^^^^^^^^^ Could not find `ast_map` in `syntax`

error[E0432]: unresolved import `syntax::diagnostic`
  --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:17:5
   |
17 | use syntax::diagnostic;
   |     ^^^^^^^^^^^^^^^^^^ no `diagnostic` in `syntax`. Did you mean to use `diagnostics`?

error[E0432]: unresolved import `syntax::ast::Item_`
 --> src/main/rust/com/github/drrb/javarust/lib/highlights.rs:6:5
  |
6 | use syntax::ast::Item_;
  |     ^^^^^^^^^^^^^^^^^^ no `Item_` in `syntax::ast`. Did you mean to use `Item`?

error[E0432]: unresolved import `syntax::diagnostic::Auto`
  --> src/main/rust/com/github/drrb/javarust/lib/highlights.rs:14:5
   |
14 | use syntax::diagnostic::Auto;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`

error[E0432]: unresolved import `syntax::diagnostic`
  --> src/main/rust/com/github/drrb/javarust/lib/highlights.rs:15:5
   |
15 | use syntax::diagnostic;
   |     ^^^^^^^^^^^^^^^^^^ no `diagnostic` in `syntax`. Did you mean to use `diagnostics`?

error[E0432]: unresolved import `syntax::diagnostic::Auto`
 --> src/main/rust/com/github/drrb/javarust/lib/lexer.rs:6:5
  |
6 | use syntax::diagnostic::Auto;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`

error[E0432]: unresolved import `syntax::diagnostic::SpanHandler`
 --> src/main/rust/com/github/drrb/javarust/lib/lexer.rs:7:5
  |
7 | use syntax::diagnostic::SpanHandler;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`

error[E0432]: unresolved import `syntax::diagnostic`
 --> src/main/rust/com/github/drrb/javarust/lib/lexer.rs:8:5
  |
8 | use syntax::diagnostic;
  |     ^^^^^^^^^^^^^^^^^^ no `diagnostic` in `syntax`. Did you mean to use `diagnostics`?

error[E0432]: unresolved import `syntax::parse::token::special_idents`
  --> src/main/rust/com/github/drrb/javarust/lib/lexer.rs:16:5
   |
16 | use syntax::parse::token::special_idents;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `special_idents` in `syntax::parse::token`

error[E0432]: unresolved import `syntax::diagnostic::Emitter`
 --> src/main/rust/com/github/drrb/javarust/lib/parser.rs:8:5
  |
8 | use syntax::diagnostic::Emitter;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`

error[E0432]: unresolved import `syntax::diagnostic::Level`
 --> src/main/rust/com/github/drrb/javarust/lib/parser.rs:9:5
  |
9 | use syntax::diagnostic::Level;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`

error[E0432]: unresolved import `syntax::diagnostic::RenderSpan`
  --> src/main/rust/com/github/drrb/javarust/lib/parser.rs:10:5
   |
10 | use syntax::diagnostic::RenderSpan;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `diagnostic` in `syntax`

error[E0432]: unresolved import `syntax::diagnostic`
  --> src/main/rust/com/github/drrb/javarust/lib/parser.rs:11:5
   |
11 | use syntax::diagnostic;
   |     ^^^^^^^^^^^^^^^^^^ no `diagnostic` in `syntax`. Did you mean to use `diagnostics`?

error[E0432]: unresolved import `std::rt::unwind`
  --> src/main/rust/com/github/drrb/javarust/lib/javarustbridge.rs:48:5
   |
48 | use std::rt::unwind;
   |     ^^^^^^^^^^^^^^^ no `unwind` in `std::rt`

error[E0433]: failed to resolve. Use of undeclared type or module `Path`
  --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:37:21
   |
37 |     let odir = Some(Path::new(&output_dir));
   |                     ^^^^^^^^^ Use of undeclared type or module `Path`

error[E0423]: `Input::Str` is the name of a struct or struct variant, but this expression uses it like a function name
  --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:39:17
   |
39 |     let input = Input::Str(request.input_source);
   |                 ^^^^^^^^^^ struct called like a function
   |
   = help: did you mean to write: `Input::Str { /* fields */ }`?

error[E0433]: failed to resolve. Use of undeclared type or module `Path`
  --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:40:32
   |
40 |     let input_file_path = Some(Path::new(&request.input_path));
   |                                ^^^^^^^^^ Use of undeclared type or module `Path`

error[E0412]: type name `Path` is undefined or not in scope
  --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:57:33
   |
57 |                      _: &Option<Path>,
   |                                 ^^^^ undefined or not in scope
   |
   = help: you can import several candidates into scope (`use ...;`):
   = help:   `rustc::hir::Path`
   = help:   `std::path::Path`
   = help:   `syntax::ast::Path`

error[E0412]: type name `Path` is undefined or not in scope
  --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:58:33
   |
58 |                      _: &Option<Path>,
   |                                 ^^^^ undefined or not in scope
   |
   = help: you can import several candidates into scope (`use ...;`):
   = help:   `rustc::hir::Path`
   = help:   `std::path::Path`
   = help:   `syntax::ast::Path`

error[E0425]: unresolved name `driver::assign_node_ids_and_map`
  --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:78:19
   |
78 |     let ast_map = driver::assign_node_ids_and_map(&sess, &mut forest);
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved name

error[E0433]: failed to resolve. Could not find `mtwt` in `syntax::ext`
  --> src/main/rust/com/github/drrb/javarust/lib/compiler.rs:90:5
   |
90 |     syntax::ext::mtwt::reset_tables();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `mtwt` in `syntax::ext`

error[E0425]: unresolved name `parse::new_parse_sess_special_handler`
  --> src/main/rust/com/github/drrb/javarust/lib/parser.rs:53:16
   |
53 |     let sess = parse::new_parse_sess_special_handler(span_handler);
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved name

error[E0107]: wrong number of lifetime parameters: expected 0, found 1
   --> src/main/rust/com/github/drrb/javarust/lib/highlights.rs:108:13
    |
108 | impl<'v,'a> Visitor<'v> for HighlightVisitor<'a> {
    |             ^^^^^^^^^^^ unexpected lifetime parameter

error: cannot continue compilation due to previous error

[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:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:745)
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
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.275 s
[INFO] Finished at: 2016-09-29T12:47:29+03:00
[INFO] Final Memory: 13M/295M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:java (compile-rust-bridge) on project rust-netbeans: An exception occured while executing the Java class. null: InvocationTargetException: rustc exited nonzero (status code = 101) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Flaflo commented 7 years ago

same here

lesichkovm commented 7 years ago

Same here:

Compiling crate src\main\rust\com\github\drrb\javarust\lib\javarustbridge.rs
Running command: [rustup, run, nightly, rustc, --out-dir, target\rust-libs, "src\main\rust\com\github\drrb\javarust\lib\javarustbridge.rs"]
error[E0432]: unresolved import `syntax::ast_map::Forest`
  --> src\main\rust\com\github\drrb\javarust\lib\compiler.rs:15:5
Chris2011 commented 7 years ago

Same here with rust 1.17.0. Is the plugin still alive? Would be great to have a first, stable release.

Chris2011 commented 7 years ago

@drrb I forked it, can you help here to build the sources again so that we an work on it again?

drrb commented 6 years ago

Closing this issue. I've started working on the plugin again, to fix it for the latest NetBeans and Rust versions. The plugin is buildable now, but needs some more work to get it working fully again.

Chris2011 commented 6 years ago

Great, nice to see it. Thank you :)