Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUILD / Make deps working, make en or make languages not working? #195

Open
ylmzmerttt opened this issue Jun 11, 2020 · 7 comments
Open

Comments

@ylmzmerttt
Copy link

~/blockly-games$ make en
mkdir -p appengine/generated/en/
java -jar third-party-downloads/SoyToJsSrcCompiler.jar --shouldProvideRequireSoyNamespaces --isUsingIjData --outputPathFormat appengine/index/generated/en/soy.js --srcs appengine/index/template.soy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:/home/yncsoft/blockly-games/third-party-downloads/SoyToJsSrcCompiler.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Exception in thread "main" java.lang.IllegalArgumentException: No enum constant com.google.template.soy.shared.SoyGeneralOptions.CssHandlingScheme.LİTERAL
at java.base/java.lang.Enum.valueOf(Enum.java:240)
at com.google.template.soy.shared.SoyGeneralOptions$CssHandlingScheme.valueOf(SoyGeneralOptions.java:50)
at com.google.template.soy.SoyToJsSrcCompiler.execMain(SoyToJsSrcCompiler.java:279)
at com.google.template.soy.SoyToJsSrcCompiler.main(SoyToJsSrcCompiler.java:243)
make: *** [Makefile:23: index-en] Error 1

@NeilFraser
Copy link
Contributor

I just tried make clean, make deps, and make en without problems on my machine. No warnings, no errors.

Try executing java -version to see what version of Java you are using. Mine reports:

java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

@mark-friedman
Copy link

Look closely at the 2nd character in "LİTERAL" above. It looks like maybe something got corrupted.

@ylmzmerttt
Copy link
Author

I just tried make clean, make deps, and make en without problems on my machine. No warnings, no errors.

Try executing java -version to see what version of Java you are using. Mine reports:

java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

My java version:
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)

@huydhoang
Copy link

Hi, I'm running Zulu java 8, Ubuntu 20.04. make deps works fine, but make en or make maze-en threw this:
What could be the problem? What is the supported python version?

Compiling Maze - en
third-party-downloads/build/closurebuilder.py: Scanning paths...
third-party-downloads/build/closurebuilder.py: 784 sources scanned.
third-party-downloads/build/closurebuilder.py: Building dependency tree..
Traceback (most recent call last):
  File "third-party-downloads/build/closurebuilder.py", line 300, in <module>
    main()
  File "third-party-downloads/build/closurebuilder.py", line 260, in main
    out.writelines([js_source.GetPath() + '\n' for js_source in deps])
TypeError: a bytes-like object is required, not 'str'
Found 0 dependencies.

@NeilFraser
Copy link
Contributor

@huydhoang That sounds an awful lot like a Python 2 vs Python 3 mismatch. I'll see if I can recreate.

@NeilFraser
Copy link
Contributor

NeilFraser commented Oct 24, 2020

@huydhoang Yes, that's exactly the issue. closurebuilder.py only works with Python 2, when run with Python 3 it blows up. I'll see if I can fix it (that file was created by the Closure team and is deprecated).

In the mean time, you should be able to fix the issue by editing the first line of of third-party-downloads/build/closurebuilder.py from this:
#!/usr/bin/env python
to this:
#!/usr/bin/env python2

shicks pushed a commit to google/closure-library that referenced this issue Nov 10, 2020
Currently closurebuilder.py throws this when run in Python 3:
```
Traceback (most recent call last):
  File "third-party-downloads/build/closurebuilder.py", line 300, in <module>
    main()
  File "third-party-downloads/build/closurebuilder.py", line 260, in main
    out.writelines([js_source.GetPath() + '\n' for js_source in deps])
TypeError: a bytes-like object is required, not 'str'
```

Writing to `sys.stdout` rather than `sys.stdout.buffer` fixes this.

Reported at google/blockly-games#195 (comment)
@JEZIGA01
Copy link

Watch my video on Youtube step by step 💕 https://youtu.be/uJ9Jz6CeiyE?t=10

My doc: https://gist.github.com/JEZIGA01/dbaedc0fae4b7cde6bddf9b3c5412fe8

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

No branches or pull requests

5 participants