Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

error: cannot find symbol import com.google.javascript.rhino.jstype.FunctionType.Parameter; #1007

Open
T-Skinner opened this issue Jun 16, 2020 · 6 comments

Comments

@T-Skinner
Copy link

> Task :compileJava FAILED
/Users/ts76/Dev/clutz/src/main/java/com/google/javascript/clutz/DeclarationGenerator.java:45: error: cannot find symbol
import com.google.javascript.rhino.jstype.FunctionType.Parameter;

What could be causing this? I ran an npm install before the ./gradlew build

@lauraharker
Copy link
Contributor

You're probably running with an older version of Closure Compiler.

The FunctionType.Parameter API was added in google/closure-compiler@041dc07 and is in the most recent release v20200614.

See https://github.com/angular/clutz#supported-versions.

Does updating your Closure Compiler version fix this?

@lauraharker
Copy link
Contributor

Created Google internal issue http://b/159832817.

@T-Skinner
Copy link
Author

T-Skinner commented Jun 28, 2020

@lauraharker How do I update the closure dependency?

I went into build.gradle and switched the dependency reference to this:
compile 'com.google.javascript:closure-compiler-unshaded:v20200614'

Now I have these new errors:

/Users/ts76/Dev/clutz2/src/main/java/com/google/javascript/gents/pass/comments/GeneralComment.java:39: error: cannot find symbol
    return new GeneralComment(comment.getCommentString(), comment.getStartPosition().getOffset());
                                                                 ^
  symbol:   method getStartPosition()
  location: variable comment of type NonJSDocComment

/Users/ts76/Dev/clutz2/src/main/java/com/google/javascript/gents/pass/comments/AstCommentLinkingPass.java:162: error: cannot find symbol
                      nonJSDocInfo.getStartPosition().getOffset())) {
                                  ^
  symbol:   method getStartPosition()
  location: variable nonJSDocInfo of type NonJSDocComment
/Users/ts76/Dev/clutz2/src/main/java/com/google/javascript/gents/pass/comments/AstCommentLinkingPass.java:166: error: cannot find symbol
                        nonJSDocInfo.getStartPosition().getOffset()));
                                    ^
  symbol:   method getStartPosition()
  location: variable nonJSDocInfo of type NonJSDocComment

@lauraharker
Copy link
Contributor

I tried updating to the latest SNAPSNOT build of Closure Compiler:

compile 'com.google.javascript:closure-compiler:1.0-SNAPSHOT'

and then I get just this error:

> Task :compileJava FAILED
clutz/src/main/java/com/google/javascript/clutz/DeclarationGenerator.java:1285: error: cannot find symbol
        .splitToStream(namespace)
        ^

and then I believe #985 (comment) has a workaround for that.

Thanks for commenting on #1006 (comment) BTW.

@T-Skinner
Copy link
Author

@lauraharker
I think I did get it to compile using the fix you mentioned but it does not pass the tests so it's useless right?

@nreid260
Copy link

nreid260 commented Sep 8, 2020

Is this still an issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants