Use generated groups, and publish/subscribe from a task, in the Julia examples - #48
Open
tsaubergine wants to merge 3 commits into
Open
Use generated groups, and publish/subscribe from a task, in the Julia examples#48tsaubergine wants to merge 3 commits into
tsaubergine wants to merge 3 commits into
Conversation
goby_add_julia_app() writes a module beside each application with a constant per group and an accessor per portal, so the scripts no longer repeat the interface.yml expression as a string. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nsf4QMNTfUxkyWh4xGaok
The subscriber task now sends deep reports to interprocess itself rather than handing them to Main, and the publisher task subscribes to the same group from its own thread. Both were restrictions of Goby.jl rather than of the layer. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nsf4QMNTfUxkyWh4xGaok
A group the generated C++ has no case for hits GOBY_JULIA_FAIL, which logs at glog's die level and terminates the application. The README claimed a typo was otherwise a message that goes nowhere; nothing was going nowhere. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nsf4QMNTfUxkyWh4xGaok
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.
Two changes to the Julia examples. The second needs GobySoft/goby3#413.
Name groups through the generated module
goby_add_julia_app()writes a module beside each application with a constant per group and an accessor per portal, but the examples still repeated theinterface.ymlexpression as a string:They now include that module and name the group through it:
The expression then lives in one place, and a mistyped group is an
UndefVarErrornaming it rather than aGOBY_JULIA_FAILthat terminates the application once the publish is reached.Publish and subscribe from a task in the multithread example
The example was written when
INTERPROCESSwas reachable only fromMain, and its header said so — publishing from a task raised anAssertionError. With GobySoft/goby3#413 that is no longer true, so the example now shows what the layer actually offers:INTERPROCESSitself, rather than handing them toMainoverINTERTHREADMainkeeps theINTERTHREADdepth-alert subscription, which is still where the "an interthread message can be any Julia value" point lives (the alert is aNamedTuple).interface.ymlgains the matchingsubscribesentry.Verified against a live
gobyd: each deep report reaches both the separatebasic_julia_subscriberprocess and the publisher task, exactly once.The publisher/subscriber pair was re-run too, to check the generated-module change on its own.
Note on CI
This job installs
libgoby3-devandgoby3-juliafrom the continuous package repo and only builds, so its green proves the Julia examples compile — including the newsubscribesentry generating valid C++ — not that the multithread example runs. That needs #413 merged and the continuous package rebuilt; the runtime evidence above is from a local build of that branch.