Move shared request/response handling into toolkit-wolfram - #12
Merged
Conversation
…valuation_function.wl` to support RPC-based function wiring through `ServeEvaluationFunction`.
…ration details, and simplified Dockerfile by excluding `evaluation_function.wl`.
…ram` version; updated README and `.gitignore` to reflect the new local development workflow.
…ed support for configurable worker start timeout.
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.
What changed
Previously, this repo contained its own copy of the communication code — the part that reads the incoming request, decides whether it's an
evalorpreview, calls yourevaluate.m/preview.m, and writes the response.This PR removes that code (
evaluation_function.wl) and instead pulls it in from a shared library,toolkit-wolfram. Your actual evaluation logic inevaluate.mandpreview.mis barely touched — a couple of small signature tweaks so they plug into the shared library correctly.Alongside that:
typeinstead ofcomparisonType, no more"error": nullin successful responses) — just reflects the new shared communication layer's format.scripts/setup-toolkit.sh, fetches the shared library locally so you can still test withwolframscripton your own machine, the same way as before.Why
This is currently the only Wolfram evaluation function, but more are planned. Moving the communication code into a shared library now means future Wolfram evaluation functions can reuse it instead of copy-pasting it, and any future bug fix or improvement only needs to happen in one place.
Feedback wanted
The main thing I'd like your take on is the new local development workflow: instead of everything living in this repo, you now run
scripts/setup-toolkit.shonce to fetch the shared library, then run the evaluation function against it locally (details in the updated README). Does this feel reasonable day-to-day, or does having that extra dependency/step get in the way of how you normally work on the evaluation logic?