Repository navigation
Extract tson-service, with protocol and http packages - #30
Merged
Merged
Conversation
The sibling's binder now reports its own reason, so the message a mapped class that cannot be analysed carries no longer has "Failed to resolve: " before it. The gap is still open: preparing the schema passes and every read throws MissingBindingException. The pin's message assertion and the UPSTREAM.md entry's quoted message follow the new wording. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ltr8-bind now reads a Java interface as a DataProtocol of DataExchanges, so the descriptor this project proposed for it is built upstream and differs from the proposal. design/invoke.md states the contract as built: one record or nothing, the response returned and a declared error thrown, per-call context as a ScopedValue around handle, names running from the data's spelling to Java's, and no proxy in the library. proposal/bind-invoke.md is kept as the record of what was proposed here, marked superseded with where it departs. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The service description leaves tson-http for a module of its own, io.ltr8.tson.service, which depends on tson-java, ltr8-bind and ltr8-annotation directly and on nothing of tson-http. tson-http depends on it and hands it on, so the adapters and demos change imports only. The api package becomes two. protocol holds Protocol, Exchange, Signature and ExchangeName and imports nothing from http. http holds the projection's records, Route, placement, the security schemes, the schema class and the description's reader, since service.tn is one schema holding the HTTP projection. The root holds TsonBindings alone. TsonApiSchema, TsonApiDescription and TsonApiCoverage are TsonServiceSchema, TsonServiceDescription and TsonServiceCoverage, and the tests named for them follow. Two things are not a move. The reader no longer names TsonMediaType: it holds the three media type names itself, and MediaTypeNamesTest holds them to TsonMediaType's. ExchangeName.of is public, since its caller is now in another package. The description's tests and fixtures stay in tson-http's test tree, in package io.ltr8.tson.service.http: the fixtures import problem.tn and one test uses TsonHttpCodec. BACKLOG.md says what remains: a protocol-side reader, the join over DataProtocol, and splitting service.tn, which waits on a probe. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
The service description leaves
tson-httpfor a module of its own, so a projection other than HTTP can reuse it. This is the first entry ofBACKLOG.md, "The module split". It is a move plus renames: the same tests pass before and after.What changes
New module
tson-service(io.ltr8.tson.service). It holdsservice.tn, the bound records, the description's reader andTsonBindings. It depends on tson-java,ltr8-bindandltr8-annotationdirectly, and on nothing oftson-http.tson-httpdepends on it and hands it on (requires transitive), so the adapters and demos change imports only.The
apipackage becomes two:io.ltr8.tson.serviceTsonBindingsio.ltr8.tson.service.protocolProtocol,Exchange,Signature,ExchangeNameio.ltr8.tson.service.httpRoute, placement, the security schemes, the schema class, the reader, coverageprotocolimports nothing fromhttp, and the root imports neither.Renames:
TsonApiSchema→TsonServiceSchema,TsonApiDescription→TsonServiceDescription,TsonApiCoverage→TsonServiceCoverage. Method names are unchanged. The test classes named for them follow, includingTsonServiceConformanceTestin the jdk adapter.service.tn's!!idis unchanged.What is not a move
TsonMediaTypefor three media type names.TsonMediaTypestays intson-http; the reader holds the names in a package-privateMediaTypeNames, and a newMediaTypeNamesTestholds them toTsonMediaType's.ExchangeName.ofis public, since its caller is now in another package.Also in this PR
UpstreamGapsTestpin and itsUPSTREAM.mdentry follow the new message. The gap is still open.ltr8-bindnow reads an interface as aDataProtocol, sodesign/invoke.mdstates the contract as built, and this project's own proposal for it is marked superseded.Worth a reviewer's eye
tson-servicehas no tests of its own. The description's tests and fixtures stay intson-http's test tree, in packageio.ltr8.tson.service.http, because the fixtures importproblem.tnand one test usesTsonHttpCodec. They reach package-private members of a package in another module only becausetson-http's tests run on the class path.http, not the root.service.tnis one schema holding the HTTP projection, and the reader's body is the!service.httpreader. In the root they would make a cycle withhttpthroughTsonBindings.io.ltr8:ltr8-bindandio.ltr8:ltr8-annotationas direct coordinates, and CI is the first run of that path.TsonJavalinAdapterTest.aNonTsonBodyIs415failed once in four from-scratch builds and passed in every rerun. This change does not touch it.Tests
./gradlew buildand./gradlew javadocpass against the sibling's currentmain: 553 tests, the 552 from before the move plusMediaTypeNamesTest. Both doc checks pass.🤖 Generated with Claude Code