bolinfest / plovr

plovr: a Closure build tool
78 stars 49 forks source link

Update Closure Compiler to v20190929 #166

Closed xvilo closed 4 years ago

xvilo commented 5 years ago

⚠️ BUILD IS FAILING RIGHT NOW ⚠️

Have to do extra work for it, current output: (help is appreciated)

$ buck build plovr
Not using buckd because watchman isn't installed.
Parsing buck files: finished in 3.8 sec
Building: finished in 15.8 sec (100%) 142/142 jobs, 14 updated
  Total time: 20.0 sec
Command failed with exit code 1.
stderr: /Users/xvilo/projects/plovr/src/org/plovr/Compilation.java:526: error: incompatible types: com.google.common.collect.ImmutableList<com.google.javascript.jscomp.JSError> cannot be converted to com.google.javascript.jscomp.JSError[]
    return normalizeErrors(result.errors, compiler);
                                 ^
/Users/xvilo/projects/plovr/src/org/plovr/Compilation.java:533: error: incompatible types: com.google.common.collect.ImmutableList<com.google.javascript.jscomp.JSError> cannot be converted to com.google.javascript.jscomp.JSError[]
    return normalizeErrors(result.warnings, compiler);
                                 ^
/Users/xvilo/projects/plovr/src/org/plovr/PlovrClosureCompiler.java:22: error: getDiagnosticGroups() in org.plovr.PlovrClosureCompiler cannot override getDiagnosticGroups() in com.google.javascript.jscomp.Compiler
  protected PlovrDiagnosticGroups getDiagnosticGroups() {
                                  ^
  attempting to assign weaker access privileges; was public
/Users/xvilo/projects/plovr/src/org/plovr/PlovrDiagnosticGroups.java:15: error: getRegisteredGroups() in org.plovr.PlovrDiagnosticGroups.AbsurdHackForDiagnosticGroups cannot override getRegisteredGroups() in com.google.javascript.jscomp.DiagnosticGroups
    public Map<String, DiagnosticGroup> getRegisteredGroups() {
                                        ^
  overridden method is static
/Users/xvilo/projects/plovr/src/org/plovr/PlovrDiagnosticGroups.java:14: error: method does not override or implement a method from a supertype
    @Override
    ^
/Users/xvilo/projects/plovr/src/org/plovr/PlovrDiagnosticGroups.java:60: error: getRegisteredGroups() in org.plovr.PlovrDiagnosticGroups cannot override getRegisteredGroups() in com.google.javascript.jscomp.DiagnosticGroups
  public Map<String, DiagnosticGroup> getRegisteredGroups() {
                                      ^
  overridden method is static
/Users/xvilo/projects/plovr/src/org/plovr/PlovrDiagnosticGroups.java:59: error: method does not override or implement a method from a supertype
  @Override
  ^
/Users/xvilo/projects/plovr/src/org/plovr/PlovrDiagnosticGroups.java:65: error: forName(java.lang.String) in org.plovr.PlovrDiagnosticGroups cannot override forName(java.lang.String) in com.google.javascript.jscomp.DiagnosticGroups
  public DiagnosticGroup forName(String name) {
                         ^
  overridden method is static
/Users/xvilo/projects/plovr/src/org/plovr/PlovrDiagnosticGroups.java:64: error: method does not override or implement a method from a supertype
  @Override
  ^
/Users/xvilo/projects/plovr/src/org/plovr/DiagnosticGroupUtil.java:25: error: forName(java.lang.String) in org.plovr.DiagnosticGroupUtil.BackdoorDiagnosticGroups cannot override forName(java.lang.String) in com.google.javascript.jscomp.DiagnosticGroups
    public DiagnosticGroup forName(String name) {
                           ^
  overridden method is static
/Users/xvilo/projects/plovr/src/org/plovr/DiagnosticGroupUtil.java:24: error: method does not override or implement a method from a supertype
    @Override
    ^
/Users/xvilo/projects/plovr/src/org/plovr/docgen/DescriptorPass.java:69: error: cannot find symbol
    NodeTraversal.traverseEs6(compiler, root, callback);
                 ^
  symbol:   method traverseEs6(com.google.javascript.jscomp.AbstractCompiler,com.google.javascript.rhino.Node,org.plovr.docgen.DescriptorPass.DescriptorPassCallback)
  location: class com.google.javascript.jscomp.NodeTraversal
/Users/xvilo/projects/plovr/src/org/plovr/Compilation.java:-1: note: Some input files use or override a deprecated API.

/Users/xvilo/projects/plovr/src/org/plovr/Compilation.java:-1: note: Recompile with -Xlint:deprecation for details.

: note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output

/Users/xvilo/projects/plovr/src/com/google/javascript/jscomp/PlovrCompilerOptions.java:29: error: cannot find symbol
    return processObjectPropertyString;
           ^
  symbol:   variable processObjectPropertyString
  location: class com.google.javascript.jscomp.PlovrCompilerOptions
/Users/xvilo/projects/plovr/src/org/plovr/cli/BuildCommand.java:91: error: cannot find symbol
    boolean success = (result.success && result.errors.length == 0);
                                                      ^
  symbol:   variable length
  location: variable errors of type com.google.common.collect.ImmutableList<com.google.javascript.jscomp.JSError>
Errors: 14. Warnings: 0.

    When running <javac>.
    When building rule //:plovr-lib.
xvilo commented 5 years ago

Merged https://github.com/bolinfest/plovr/pull/167 into this branch

xvilo commented 5 years ago

⚠️ build is failing ⚠️

Fixed a couple of issues:

Command failed with exit code 1.
stderr: /Users/xvilo/projects/plovr/src/org/plovr/PlovrDiagnosticGroups.java:15: error: getRegisteredGroups() in org.plovr.PlovrDiagnosticGroups.AbsurdHackForDiagnosticGroups cannot override getRegisteredGroups() in com.google.javascript.jscomp.DiagnosticGroups
    public Map<String, DiagnosticGroup> getRegisteredGroups() {
                                        ^
  overridden method is static
/Users/xvilo/projects/plovr/src/org/plovr/PlovrDiagnosticGroups.java:14: error: method does not override or implement a method from a supertype
    @Override
    ^
/Users/xvilo/projects/plovr/src/org/plovr/PlovrDiagnosticGroups.java:60: error: getRegisteredGroups() in org.plovr.PlovrDiagnosticGroups cannot override getRegisteredGroups() in com.google.javascript.jscomp.DiagnosticGroups
  public Map<String, DiagnosticGroup> getRegisteredGroups() {
                                      ^
  overridden method is static
/Users/xvilo/projects/plovr/src/org/plovr/PlovrDiagnosticGroups.java:59: error: method does not override or implement a method from a supertype
  @Override
  ^
/Users/xvilo/projects/plovr/src/org/plovr/Compilation.java:-1: note: Some input files use or override a deprecated API.

/Users/xvilo/projects/plovr/src/org/plovr/Compilation.java:-1: note: Recompile with -Xlint:deprecation for details.

/Users/xvilo/projects/plovr/src/com/google/javascript/jscomp/PlovrCompilerOptions.java:29: error: cannot find symbol
    return processObjectPropertyString;
           ^
  symbol:   variable processObjectPropertyString
  location: class com.google.javascript.jscomp.PlovrCompilerOptions
/Users/xvilo/projects/plovr/src/org/plovr/cli/BuildCommand.java:91: error: cannot find symbol
    boolean success = (result.success && result.errors.length == 0);
                                                      ^
  symbol:   variable length
  location: variable errors of type com.google.common.collect.ImmutableList<com.google.javascript.jscomp.JSError>
Errors: 6. Warnings: 0.

    When running <javac>.
    When building rule //:plovr-lib.
xvilo commented 5 years ago

Build now succeeds, have to run tests and try to compile an test project first

xvilo commented 5 years ago

While jar is able to build, it can not compile anything right now

$ buck run plovr build ~/some/dire/site.conf
Not using buckd because watchman isn't installed.
Parsing buck files: finished in 5.8 sec
Creating action graph: finished in 0.9 sec
Building: finished in 4.6 sec (100%) 1/1 jobs, 0 updated
  Total time: 11.4 sec
Exception in thread "main" java.lang.NullPointerException
    at org.plovr.PlovrDiagnosticGroups.<init>(PlovrDiagnosticGroups.java:25)
    at org.plovr.PlovrClosureCompiler.<init>(PlovrClosureCompiler.java:17)
    at org.plovr.Compilation.create(Compilation.java:122)
    at org.plovr.cli.BuildCommand.runCommandWithOptions(BuildCommand.java:63)
    at org.plovr.cli.BuildCommand.runCommandWithOptions(BuildCommand.java:32)
    at org.plovr.cli.AbstractCommandRunner.runCommand(AbstractCommandRunner.java:41)
    at org.plovr.cli.Command.execute(Command.java:47)
    at org.plovr.cli.Main.mainWithExitCode(Main.java:56)
    at org.plovr.cli.Main.main(Main.java:30)
xvilo commented 5 years ago

v20190325, now checking v20190929

xvilo commented 5 years ago

Builds a jar file, can build our project (s).

Bút, current issues:

xvilo commented 5 years ago

Currently builds:

java -jar /Users/xvilo/projects/plovr/buck-out/gen/plovr.jar info
plovr built from revision edd803731907ff7019ed6e067bbb3acd99a0f996
Revision numbers for embedded Closure Tools:
Closure Library:    ff3c721dc4395303505cb79b1b54b43b5f93d9ad
Closure Compiler:                                  v20190929
Closure Templates:                                2018-03-14

Build: plovr-2019-10-05_1110.jar

xvilo commented 5 years ago

Merged https://github.com/bolinfest/plovr/pull/165 in here, it would be great if that could be merged too so we have a more clear view of this MR's changes.

Build: plovr-2019-10-05_1128.jar

xvilo commented 5 years ago

Build is currently passing, added Travis for easy testing in my branch. See: https://travis-ci.org/xvilo/plovr/builds/593889545?utm_source=github_status&utm_medium=notification

nicks commented 5 years ago

thanks, this was helpful! i did it a slightly different way, getting rid of the diagnostic group hacks because they're no longer necessary

xvilo commented 5 years ago

Ah, bút it seems we have issues with the newley introduced "requireType"

xvilo commented 5 years ago

Ah, I see these have been fixed too! Wonderfull