Skip to content

[smalruby3-editor] Fix build failures and integration test timeouts #31

@takaokouji

Description

@takaokouji

Related to

#29

Description

Almost all integration tests in the smalruby3-editor monorepo currently fail because the build process is broken. The build fails primarily due to Module not found errors, as many source files and configuration files still refer to packages using the @scratch/ scope (e.g., @scratch/scratch-vm) instead of the @smalruby/ scope used in this fork.

Root Causes

  1. Build Failure: npm run build fails because sub-packages cannot resolve dependencies that have been renamed to @smalruby/.
    • Example: packages/scratch-render/src/SVGSkin.js requires @scratch/scratch-svg-renderer.
  2. Webpack Configurations: webpack.config.js in scratch-gui and scratch-vm still use @scratch/ in CopyWebpackPlugin patterns and other places.
  3. Integration Test Timeouts: Since the build fails, the build/index.html file used by integration tests is missing or broken, leading to Selenium timeouts when trying to find elements.

Findings

A search revealed numerous occurrences of @scratch/ that should be updated:

  • packages/scratch-gui/src/**/*.jsx
  • packages/scratch-render/src/**/*.js
  • packages/scratch-vm/src/**/*.js
  • packages/task-herder/package.json (still named @scratch/task-herder)
  • Various webpack.config.js, tsconfig.json, and eslint.config.mjs files.

Proposed Improvements

  1. Global Package Name Update: Replace all occurrences of @scratch/scratch-vm, @scratch/scratch-render, @scratch/scratch-svg-renderer, and @scratch/task-herder with their @smalruby/ counterparts throughout the codebase.
  2. Update Webpack Paths: Ensure webpack.config.js files correctly reference node_modules in the monorepo structure (e.g., using workspaces or correct relative paths).
  3. Fix task-herder: Update packages/task-herder/package.json to use the @smalruby scope if it's intended to be part of this fork.
  4. Verify Build: Ensure npm run build completes successfully.
  5. Run Integration Tests: Once the build passes, verify that npm run test:integration succeeds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions