Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was 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

Description

@T-Skinner
> 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

Activity

  1. lauraharker commented on Jun 24, 2020

    @lauraharker
    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?

  2. lauraharker commented on Jun 24, 2020

    @lauraharker
    Contributor

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

  3. T-Skinner commented on Jun 28, 2020

    @T-Skinner
    Author

    @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
    
  4. lauraharker commented on Jun 29, 2020

    @lauraharker
    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.

  5. T-Skinner commented on Jun 29, 2020

    @T-Skinner
    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?

  6. nreid260 commented on Sep 8, 2020

    @nreid260

    Is this still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions