defold / extension-webmonetization

Defold integration to the Web Monetization API
MIT License
4 stars 3 forks source link

Extension update for 1.4.8? #4

Closed thejustinwalsh closed 1 year ago

thejustinwalsh commented 1 year ago

👋

I've recently updated many template projects, and CI/CD caught this in a build, referenced in https://github.com/ts-defold/tsd-template-web-monetized/issues/33 for tracking.

It looks like the internal API has changed and this extension no longer compiles against 1.4.8, tbh, I am not sure at what version this broke in though. The error I am seeing is:

ERROR: webmonetization/src/webmonetization.cpp:57: 'too few arguments to function call, expected 5, have 3
        dmScript::JsonToLua(L, details, strlen(details)); // throws lua error if it fails'

Full build log here: https://github.com/ts-defold/tsd-template-web-monetized/actions/runs/5799845587/job/15720726121

Not sure if there are plans to keep this extension updated, or if the web monetization spec is dead. If you decide not to update this extension I will in turn archive the template.

britzl commented 1 year ago

It looks like your GH Workflow relies on an old SDK version:

https://github.com/ts-defold/tsd-template-web-monetized/blob/master/.github/workflows/build.yml#L26

That bob.jar version you are downloading is 1.2.186. The fact that you are using an old bob.jar is not necessarily a problem, but in this case it will then build with an old Defold SDK where the function signature for that json function has changed. You can usually use an old bob.jar with a new Defold SDK by adding --defoldsdk=sdk-sha1 to the bob.jar command line, but my recommendation is that you download a newer bob.jar version (1.4.8)

thejustinwalsh commented 1 year ago

Ahhh, thank you for pointing that out. I will update these, and see if I can parametrize the pull of the right bob.jar.

My bad. Thanks again!