Skip to content

エラーハンドリング周りの修正 - #1035

Merged
FineArchs merged 2 commits into
aiscript-dev:masterfrom
FineArchs:fix-abortOnError
Nov 20, 2026
Merged

FineArchs merged 2 commits into
aiscript-dev:masterfrom
FineArchs:fix-abortOnError

Conversation

@FineArchs

Copy link
Copy Markdown
Member

Interpreterのerrハンドラ、abortOnError周りでバグがあったので修正します。

  • Async:intervalをimmidiate: trueで実行した時、初回実行のエラーがハンドラに補足されない
  • abortOnError: true時、interpreter.abortがtrueになった時loopなどの制御文の評価で空の無限ループが発生する

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/interpreter/lib/std.ts 0.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Files with missing lines Coverage Δ
src/interpreter/index.ts 74.84% <100.00%> (-10.97%) ⬇️
src/interpreter/lib/std.ts 84.34% <0.00%> (+5.10%) ⬆️

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FineArchs

Copy link
Copy Markdown
Member Author

see also: misskey-dev/misskey#18168

@ikasoba ikasoba left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

レビューいたしました

LGTM です 🙌

if (immediate) {
assertBoolean(immediate);
if (immediate.value) opts.call(callback, []);
if (immediate.value) opts.topCall(callback, []);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM なのですが、一応補足としてコメントを残しておきます。

call から topCall とした場合、コールスタックが途切れますが、待たずに実行を予約する意図 (JS の setImmediate 相当) ならば問題なさそうです。

https://github.com/FineArchs/aiscript/blob/0fe4cb6c087e760cdc697c59f71cafd7a8f32e79/src/interpreter/index.ts#L342

@FineArchs
FineArchs merged commit a8c3d1d into aiscript-dev:master Nov 20, 2026
4 checks passed
@FineArchs

Copy link
Copy Markdown
Member Author

マージ条件を満たしていたのでマージしました。

@FineArchs
FineArchs deleted the fix-abortOnError branch November 20, 2026 10:17
@syuilo

syuilo commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

🙏🏻

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.

5 participants