Skip to content

fix: keep rune and repeat bundles conductor-safe - #868

Open
martin-henz wants to merge 2 commits into
masterfrom
replace-pr-837
Open

fix: keep rune and repeat bundles conductor-safe#868
martin-henz wants to merge 2 commits into
masterfrom
replace-pr-837

Conversation

@martin-henz

Copy link
Copy Markdown
Member

Re-opens #837, which was automatically closed (not merged) when its base branch conductor-migration was deleted after being merged into master via #680. This branch cherry-picks the original commits from @11suixing11 unchanged, onto current master.

Summary

  • replace rune/repeat Conductor bundle imports from modules-lib errors/utilities with Conductor errors/assertions or local pure helpers
  • keep repeat_internal synchronous without callWithoutMetadata so rune can import repeat without pulling js-slang externals
  • add local hexToColor/hueToRgb helpers used by rune color functions

Fixes #825

Testing (from original PR, re-verify on CI)

  • yarn workspace @sourceacademy/bundle-rune test
  • yarn workspace @sourceacademy/bundle-repeat test
  • yarn workspace @sourceacademy/bundle-rune tsc
  • yarn workspace @sourceacademy/bundle-repeat tsc
  • yarn workspace @sourceacademy/bundle-rune lint
  • yarn workspace @sourceacademy/bundle-repeat lint (passes with existing IModuleExport warning)
  • rg "js-slang|@sourceacademy/modules-lib/(errors|utilities)|assertNumberWithinRange|callWithoutMetadata|InvalidParameterTypeError|GeneralRuntimeError" build/bundles/rune.js build/bundles/repeat.js -n (no matches)

Original author: @11suixing11

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

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.

modules-lib/errors and /utilities's js-slang re-exports resolve to undefined under Conductor (rune, repeat affected)

2 participants