-
Notifications
You must be signed in to change notification settings - Fork 25
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
Make sure extension work as an applet #54
Comments
I am making progress, but it seems that I am playing Whac-A-Mole with ProGuard, here. I have already added:
...and that got rid of one of the errors above. But now, simple stuff like flattening an option (converting an optional iterable to an iterable that can be empty) gives me:
So I am wondering if I should:
Some things to consider:
|
(should not have been closed - that was an accidental click) |
Adding:
pushes NetLogoLite.jar to 6.3MB, which is probably not what we want. Also, there might have been something else going on, but it took ProGuard 15 minutes to do its job. |
Each of these allowed me to neutralize a particular exception:
but after getting a
causes this upon loading the applet:
Maybe something else is wrong. |
Restarting Firefox actually got rid of that last exception. Still whac-a-molin', though. |
With this:
everything appears to be working. Can't be a 100% sure I've covered all code paths, though. It occurred to me, however: maybe compiling against NetLogoLite without the Scala library on the class path would catch some errors. Will try that. |
Eclipse is, unsurprisingly I suppose, not letting me compile without a Scala library on the class path. I wonder if there is a way to do it with sbt. |
Idea for testing code paths in applet: port code in test.txt to an actual NetLogo model I can run in applet. |
After porting the unit test code to a test applet, I further added:
Not 100% sure everything is covered, but I am leaving it at that for now. |
All these additions take Not sure if I should push this to |
For now, at least, we are not going to go with the bigger jar for I've added the alternate jars to the nw extension distribution zip. This is documented in the readme. Still need to automate its inclusion in the zip (#63). |
There is now a wiki page with extra info about this: https://github.com/NetLogo/NW-Extension/wiki/Producing-an-alternate-NetLogoLite.jar |
Current status: everything loads fine, but certain method calls create exceptions. Examples:
And:
Hypothesis: it is still ProGuard related.
I first thought it might have something to do with NetLogo/NetLogo#163, but the extensions does compile fine against NetLogoLite.jar.
The text was updated successfully, but these errors were encountered: