fix(antd-kotlin): make put-response cost optional; ship missing gradle wrapper#77
Open
Nic-dorman wants to merge 1 commit into
Open
fix(antd-kotlin): make put-response cost optional; ship missing gradle wrapper#77Nic-dorman wants to merge 1 commit into
Nic-dorman wants to merge 1 commit into
Conversation
…e wrapper Two issues blocking antd-kotlin example 02 from running: 1) DataPutPublicDto deserialization failed: MissingFieldException: Field cost is required for type with serial name com.autonomi.sdk.DataPutPublicDto, but it was missing The daemon currently returns address, chunks_stored, payment_mode_used for PUT /v1/data/public, with no cost field. Make cost default to empty, mirroring how the PHP REST client falls back to empty string. Same for the DataPutPrivateDto sibling. 2) antd-kotlin/gradlew and antd-kotlin/gradle/wrapper/gradle-wrapper.jar were not committed - only gradle-wrapper.properties was. With the wrapper script absent, the README example invocation failed immediately with "No such file or directory". Add the wrapper files (copied from antd-java which shipped them correctly, modulo a missing executable bit). Closes #69
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #69.
Two issues blocked
antd-kotlinexample 02 from running. Both fixed here because either one alone leaves the binding non-functional out of the box.1.
DataPutPublicDtodeserialization failureThe example fataled on:
The daemon currently returns
{address, chunks_stored, payment_mode_used}forPUT /v1/data/public— nocostfield:Make
costdefault to empty inDataPutPublicDto(andDataPutPrivateDto), mirroring how the PHP REST client falls back to''and how the Python REST client uses.get(...)with implicitNone. Non-breaking —PutResult.coststill ends up the sameStringtype downstream.2. Missing gradle wrapper files
antd-kotlin/shippedgradle/wrapper/gradle-wrapper.propertiesbut notgradleworgradle/wrapper/gradle-wrapper.jar. The README tells users to run./gradlew :examples:run --args=2, which gives:Add the wrapper script (executable) and the wrapper jar, copied from
antd-java/.gradle-wrapper.jaris a checked-in binary in bothantd-java/and other JVM projects in this repo, so adding it here is consistent.Test plan
bash ./gradlew :examples:build --no-daemon -q— succeeds, downloads gradle 8.8 per wrapper configbash ./gradlew :examples:run --args=2 --no-daemon -qagainst a local devnet — exits 0, prints address, retrieved data, "Public data round-trip OK!"DataPutPublicDtorequires field 'cost' but daemon response omits it #69)Sample output
(
Actual costblank for the same reason — daemon doesn't return it on this path. That's worth its own ticket ifcostis supposed to be populated on PUT responses; the SDK-side change in this PR is correct either way since "optional with default" matches reality.)