Cryptic contract violation from with-current-saved-continuation-marks-and
まだ誰も着手していません。
評価
調査の方向性
まず web-server/lang/abort-resume.rkt の 244 行目付近と、問題のある portal/private-servlet/feedback/notify.rkt モジュールから始め、次に config.rkt のスタック参照を調べます。web-server ベースの言語で契約違反を再現し、web-server と racket/base での直接実行を比較します。報告された失敗と CS invalid-memory-reference の挙動が説明され、回帰テストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
After refactoring a big web-server program, attempting to run it now blames one of my modules for violating the contract of with-current-saved-continuation-marks-and ("expected 1 value, returned 2 values in: the range of the 3rd argument of (-> any/c any/c (-> any/c) any/c)"—full message below).
I am not sure how to minimize this example. The blamed module doesn't use with-current-saved-continuation-marks-and directly (nor does any of my code), and it doesn't even seem to use or define any functions with multiple return values. It is written in a language based on #lang web-server. (Changing to the plain #lang web-server doesn't seem to help.)
The bug seems to be the web server's fault: changing the blamed module to use #lang racket/base seems to fix the error. (It isn't clear why this module was in a web-server-based language in the first place: my guess is that I left it that way in an earlier refactoring.)
The contract problem happens both in Racket 7.4 CS and in traditional Racket built from master, but Racket CS has an additional problem: if I try to run the blamed module directly (i.e. racket portal/private-servlet/feedback/notify.rkt) when it's #lang is either web-server or my web-server-based language, Racket 7.4 CS has an "invalid memory reference," whereas traditional Racket succeeds.
Here's the full error message:
Sapientia:ricoeur-portal philip$ ./config/no-voyant-test.rkt
with-current-saved-continuation-marks-and: contract violation;
expected 1 value, returned 2 values
in: the range of
the 3rd argument of
(-> any/c any/c (-> any/c) any/c)
contract from:
<pkgs>/web-server-lib/web-server/lang/abort-resume.rkt
blaming: <pkgs>/ricoeur-portal/portal/private-servlet/feedback/notify.rkt
(assuming the contract is correct)
at: <pkgs>/web-server-lib/web-server/lang/abort-resume.rkt:244.2
context...:
/Users/pltbuild/build/plt-release-64/bundle/racket/collects/racket/contract/private/blame.rkt:347:0: raise-blame-error16
loop
/Users/pltbuild/build/plt-release-64/bundle/racket/collects/racket/contract/private/arrow-common.rkt:63:5
call-with-values
call-with-values
call-with-values
/Users/philip/code/ricoeur/ricoeur-portal/config.rkt:207:22: pr:proc
call-with-values
/Users/pltbuild/build/plt-release-64/bundle/racket/collects/racket/private/promise.rkt:103:0: force/generic
/Users/philip/code/ricoeur/ricoeur-portal/config.rkt:217:21
call-with-values
body of (submod "/Users/philip/code/ricoeur/ricoeur-portal/config/no-voyant-test.rkt" main)
temp37_0
for-loop
run-module-instance!125
#%for-each
- 主要言語
- Racket
- スター
- 100
- フォーク
- 48
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
racket/web-server のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
racket/web-server#46 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
racket/web-server#141 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
racket/web-server#140 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
racket/web-server#135 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
racket/web-server#131 · コメント 1 件 ·
racket/web-server の issue をすべて見る
似ている issue
-
DeviceTrackerオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
XiaoMi/ha_xiaomi_home#1821 ·
メンテナーはふだん 1 日以内に返信
-
Maven path-index: "Ambiguous or noncanonical artifact path" error does not report the offending pathオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
pulp/pulp_maven#524 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Service process inherits the caller's cwd at first use, holding that folder open on Windows (EBUSY)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
ethereum/execution-apis#935 ·
メンテナーはふだん 1 日以内に返信