Skip to content

Update for clusterio master (Vite, error classes, async factories) - #514

Merged
Cooldude2606 merged 4 commits into
explosivegaming:mainfrom
bbassie:fix/clusterio-master-compat
Oct 29, 2026
Merged

Cooldude2606 merged 4 commits into
explosivegaming:mainfrom
bbassie:fix/clusterio-master-compat

Conversation

@bbassie

@bbassie bbassie commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

ExpCluster main stopped building against clusterio master after the merges on 27 and 28 October. This brings it back in line. Tested against clusterio master 2fb5300e (Merge pull request #1140).

One commit per clusterio change:

  • Draft: Replace webpack with Vite and load plugins as ES modules (vote) clusterio/clusterio#1130 (Vite): every plugin builds its web bundle with clusterioPlugin() from @clusterio/web_ui/vite.mjs. The webpack.config.cjs files and the webpack, webpack-cli and webpack-merge dev dependencies are gone, vite and @clusterio/web_ui are dev dependencies everywhere, and .npmignore lists vite.config.js. The web interface rejects webpack-built bundles, and the catalog no longer has webpack, so pnpm install failed before this.
  • Replace bootstrap methods with async factories clusterio/clusterio#1129 (async factories): datastores load with SubscribableDatastore.fromProvider because DatastoreProvider.bootstrap was removed. The instance tests pass their server stub to the Instance constructor, which now takes the FactorioServer in place of the Factorio directory.
  • Remove the web UI status column from the plugin pages clusterio/clusterio#1140 (plugin page web column): the empty web entrypoints from 99d47cf are gone, since plugins without one no longer show "Error loading module". exp_auto_restart, exp_commands, exp_gui, exp_server_list, exp_server_ups and exp_util lose webEntrypoint and web/index.tsx. They keep the Vite build, because the browser still loads index.ts from it to register messages and permissions, and their browser tsconfig now checks index.ts.
  • Keep error classes across links clusterio/clusterio#999 (error classes): RequestError is gone. Missing records throw NotFoundError, bad input ValidationError, duplicates ConflictError, and seeding without exp_roles/exp_groups loaded throws UnavailableError. exp_auto_restart treats any ClientError from the host as a final refusal, which matches what RequestError meant before (the host's restart refusals are ConflictErrors now).

The hook refactor (#1020), the player_sync rename (#1072), plugin migrations (#1073), the plugin browser (#1010) and the findUnusedName removal (#1128) needed nothing. Every entrypoint already exports a function and nothing references inventory_sync, LockFile or findUnusedName.

Checks run locally: pnpm install and the node.yml recipe in a fresh clone (install, pnpm --filter "@expcluster/*" run test, and the per-package tsc --build reference loop from an empty dist) all pass, as does Lua Lint with emmylua_check 0.24.0 (0 findings).

Smoke test: a standalone controller and host from this branch, one instance on Factorio 2.1.24 with all twelve exp_* plugins and the built-in plugins disabled. The save gets patched with the exp modules and registers 104 commands. The plugins page lists every plugin without a load error. I clicked through Roles (the seed button creates 15 roles and 5 groups, and roles sync to the game), a role view, Permission Groups and a group view (its defines load from staticRoot after a mod pack export), Reports (adding to the watch list works, and adding the same player again shows the ConflictError message), Scenario Features, Statistics, the user page extensions and the Discord login form. Nothing in the cluster log at warn or above besides the missing Factorio credentials.

The browser console logs one MaxListenersExceededWarning per page. Link caps the connector at 20 listeners, and each module-level MapSubscriber adds a connect and a close listener, so ExpCluster's eight subscribers on top of core's go over. That limit belongs in clusterio, not here.

🤖 Generated with Claude Code

bbassie and others added 4 commits October 28, 2026 23:43
clusterio#1130 replaced webpack with Vite and the web interface rejects
webpack-built plugin bundles. Each plugin now builds with clusterioPlugin()
from @clusterio/web_ui/vite.mjs, and the webpack configs and dependencies
are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clusterio#1129 replaced DatastoreProvider.bootstrap with async factories
and Instance now takes its FactorioServer in the constructor, so the
instance tests pass their server stub there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clusterio#999 removed RequestError. Handlers now throw NotFoundError,
ValidationError, ConflictError or UnavailableError, and exp_auto_restart
treats any ClientError from the host as a final refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clusterio#1140 no longer reports plugins without a web entrypoint as
failing to load, so the empty web modules from 99d47cf can go. The
browser tsconfig of these plugins now checks index.ts instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Cooldude2606
Cooldude2606 merged commit be68248 into explosivegaming:main Oct 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants