Repository navigation
Let define_module(dependencies=...) work on the Solara server - #1244
Merged
Merged
Conversation
…he solara server ipyvue and ipyreact are adding a dependencies= argument to define_module, and solara replaces both functions on its server, so calls that pass it raised TypeError. An explicit list now overrides the stored one, also on redefinition, and the vue variant now also updates the dependencies of a live url module. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
maartenbreddels
temporarily deployed
to
fix/esm-module-dependencies - solara-stable PR #1244
October 5, 2026 13:50 — with
Render
Destroyed
This was referenced Oct 5, 2026
maartenbreddels
marked this pull request as ready for review
October 5, 2026 15:19
This branch was successfully deployed
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.
Lets apps pass
dependencies=todefine_moduleon the Solara server, as ipyvue and ipyreact now allow.Problem
ipyvue (#106, #108) and ipyreact are getting a
dependencies=argument ondefine_module, so an app can say which modules a module waits for.Solara replaces both libraries'
define_moduleon its server with kernel-aware versions, and those versions have nodependencies=argument.So app code that passes it works in Jupyter but raises
TypeErrorwhen the same app runs on Solara.Change
solara/server/esm.py(ipyreact) andsolara/server/esm_vue.py(ipyvue):define_moduletakesdependencies: Optional[List[str]] = None.esm_vue.create_modulesnow also updatesdependencieson a live url-backed widget. Before, only code and path modules got the update, so an explicit list on a url module never reached the browser.Validation
tests/unit/esm_test.pyandtests/unit/esm_vue_test.pygainedtest_define_module_dependencies: explicit list, default, redefinition without a list, redefinition with a list, and (Vue) a redefined url module. 20 tests passed locally.define_module, because the released ipyvue 3.0.0 does not have it yet.Gaps
define_moduleyet, soesm_vue_test.pyskips in CI until ipyvue #106 is released.Align results
Caution
/alignwas not run on this change: the interface (ipyreact parity, explicitdependencies=overrides the default) was settled with the maintainer in the ipyvue review session.Crossreview results
🤖 Generated with Claude Code