GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — fix: wait for dependencies before loading custom tools and plugins by thdxr · Pull Request #12227 · anomalyco/opencode Conversation
Member
SummaryFixes a race condition where custom tools with external dependencies in their package.json would crash on import because dependencies weren't installed yet. ProblemWhen a custom tool file had an import like: import { say } from 'cowsay' at the top level, and the tool directory had a package.json with cowsay as a dependency, the tool would crash with "Cannot find package 'cowsay'" because dependencies weren't installed before the module was imported. Solution
Changes
TestingAdded a test that creates a tool with cowsay as a dependency and imports it at the top level. The test verifies the tool loads without crashing.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsFixes a race condition where custom tools with external dependencies in their package.json would crash on import because dependencies weren't installed yet. Changes: - Config.state() now collects dependency installation promises in a deps array - Added Config.waitForDependencies() to await all installations - ToolRegistry calls waitForDependencies() before loading custom tools - Plugin.list() calls waitForDependencies() before loading plugins - Added test to verify tools with external deps (cowsay) load successfully
thdxr
enabled auto-merge (squash)
Uh oh!
There was an error while loading. Please reload this page.
01luyicheng
pushed a commit
to 01luyicheng/opencode
that referenced
this pull request
This was referenced
Colin4k1024
pushed a commit
to Colin4k1024/opencode
that referenced
this pull request
3 tasks
schneiderlo
pushed a commit
to schneiderlo/opencode
that referenced
this pull request
Rwanbt
pushed a commit
to Rwanbt/unifia
that referenced
this pull request
AIALRA-0
pushed a commit
to AIALRA-0/opencode-turn-engine
that referenced
this pull request
Rwanbt
pushed a commit
to Rwanbt/unifia
that referenced
this pull request
MarsQiu007
referenced
this pull request
in MarsQiu007/openNovel
meSingh
pushed a commit
to meSingh/opencode
that referenced
this pull request
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabelsProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |