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

compilationLevel ADVANCED_OPTIMIZATIONS #262

Open
wowoName opened this issue Apr 30, 2024 · 6 comments
Open

compilationLevel ADVANCED_OPTIMIZATIONS #262

wowoName opened this issue Apr 30, 2024 · 6 comments

Comments

@wowoName
Copy link

I'm sorry I wasn't accurate, but here's what my code looks like。
This code should work in the browser console
a
But when I call the 'getSideName' method in 'ActiveUnitAgent' through the call console with the data I got in step 1, it doesn't work.
code:
clientCore.getActiveUnits()[0].getSideName();
b

How should I modify it? Thank you very much!!!

@niloc132
Copy link
Member

Can you clarify what you mean by "it doesn't work" - the data is missing, the JS is incorrect, etc? Maybe share some code snippets as text instead of images?

Any other errors/warnings when compiling? it doesn't look correct to use goog.require to reference a class compiled by j2cl - should be goog.module.get() instead probably (since they are registered with goog.module, not goog.provides).

Also, I don't yet understand the use case, but externs might be more correct than exports, if the JS isnt being exported correctly.

@treblereel
Copy link
Collaborator

@niloc132 I would like to have some details about goog.exportSymbol

@wowoName
Copy link
Author

What I mean by not working is when I execute code in the browser console
clientCore.getActiveUnits()[0].getSideName();
A message is displayed indicating that the current method does not exist。
df9438a944dc1a74cd27d0acee14c287

@treblereel
Copy link
Collaborator

treblereel commented Apr 30, 2024

@wowoName i see, it's quite complex topic, I suggest you to take a look at https://github.com/treblereel/gwt3-processors @GWT3Export section. It might help you export your type into js.

ps. if you have any q, you can reach me out at Vertispan/j2cl channel at element

@wowoName
Copy link
Author

@treblereel I joined in the project 'org. Treblereel. J2cl. Processors'
At the same time, adding the comment @GWT3Export to the 'getSideName' method can compile and package normally, and the compiled package is no different from the previous one. Next do not know how to change the modification ~
![1714469060573](https://github.com/Vertispan/j2clmavenplugin/assets/32700497/736c2b92-b571-4c38-a5d9-9bcf4f13
1714469041025
1a67)

@wowoName
Copy link
Author

1714469060573

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

3 participants