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

Move XML-related code in Web to new util class #3298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ewpatton
Copy link
Member

Change-Id: I79468d41978d1d2c3c41b41f9c9992092fd22da4

General items:

For all other changes:

  • I branched from master
  • My pull request has master as the base

What does this PR accomplish?

tldr: This fixes a regression in master where compiling an app without a Web component causes a syntax error in Kawa.

In the PR that made it so dictionaries could be parsed directly in the Scheme code, I referenced com.google.appinventor.components.runtime.Web in the code since we want to call a static function on Web that handles the parsing of JSON. It seems though that by referencing the class, Kawa loads it and attempts to validate all of its types, including the class com.google.appinventor.components.runtime.repackaged.org.json.XML. This is provided by a library, json.jar, which is annotated on the Web component. When compiling the companion, or any other app that has a Web component, this JAR file is included and the app will build. For apps without a Web component (e.g., HelloPurr), the library is not included in the classpath and Kawa fails to compile the runtime.scm, despite the fact that none of the code in Screen1 will call the particular XML-related function. This PR moves the call to the XML library to a separate XmlUtil class, which allows the Web class to validate. Why Kawa manifests this as a SyntaxError is a mystery to me.

Change-Id: I79468d41978d1d2c3c41b41f9c9992092fd22da4
@ewpatton
Copy link
Member Author

Note this will fail Jenkins right now because it's not finding the mobileprovisioning profiles needed for the iOS code.

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

Successfully merging this pull request may close these issues.

2 participants