contract error: shift path normalization to error time
Making a pathcollects-relative at contract-formation time means a lot of extra work then and a change to the needed sandbox permissions. Aormalizing at error time is more consistent with other parts of a contract message.
This commit is contained in:
parent
3f7fcdf1b7
commit
70eb426aa4
|
@ -215,13 +215,13 @@
|
|||
(define blaming-line
|
||||
(cond
|
||||
[(null? (cdr blame-parties))
|
||||
(format " blaming: ~a" (car blame-parties))]
|
||||
(format " blaming: ~a" (convert-blame-singleton (car blame-parties)))]
|
||||
[else
|
||||
(apply
|
||||
string-append
|
||||
" blaming multiple parties:"
|
||||
(for/list ([party (in-list blame-parties)])
|
||||
(format "\n ~a" party)))]))
|
||||
(format "\n ~a" (convert-blame-singleton party))))]))
|
||||
|
||||
(define from-line
|
||||
(if (blame-original? blme)
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
[make-module-identifier-mapping make-free-identifier-mapping]
|
||||
[module-identifier-mapping-get free-identifier-mapping-get]
|
||||
[module-identifier-mapping-put! free-identifier-mapping-put!]))
|
||||
setup/path-to-relative
|
||||
"arrow.rkt"
|
||||
"base.rkt"
|
||||
"guts.rkt"
|
||||
|
@ -91,7 +90,7 @@
|
|||
#`(contract contract-id
|
||||
id
|
||||
pos-module-source
|
||||
(maybe-call-path->relative-string/library (quote-module-name))
|
||||
(quote-module-name)
|
||||
'external-id
|
||||
#,srcloc-code))))))])
|
||||
(when key (hash-set! saved-id-table key lifted-id))
|
||||
|
@ -121,12 +120,6 @@
|
|||
[external-id (provide/contract-transformer-external-id self)])
|
||||
(provide/contract-transformer contract-id id external-id new-pos (make-hasheq)))))
|
||||
|
||||
|
||||
(define (maybe-call-path->relative-string/library x)
|
||||
(if (path? x)
|
||||
(path->relative-string/library x)
|
||||
x))
|
||||
|
||||
|
||||
(define-for-syntax (true-provide/contract provide-stx just-check-errors? who)
|
||||
(syntax-case provide-stx ()
|
||||
|
|
Loading…
Reference in New Issue
Block a user