[plt-dev] xml contract violation
The way that the XML boxes work is to have the XML collect parse XML
that contains embedded structs that aren't XML. To implement that, but
provide real contracts in other places, it uses a permissive?
parameter to control whether the contract is enforced. It looks like
when I added the permissive? parameterizes, I may've missed one place
that needed them...
On line 55 of stepper/private/xml-snip-helpers, that call to read-xml
should be wrapped in parameterize (like the line after it) and maybe
the eliminate-whitespace one too. But I don't know how to test that
unit test that code... (I just tried something and can't make it error
like you have.)
Jay
On Fri, Mar 13, 2009 at 5:39 AM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> Anyone recognize this?
>
> (file "C:\\cygwin\\home\\robby\\svn\\exp\\plt\\collects\\xml\\private\\reader.ss")
> broke the contract
> (->
> (or/c location? symbol? #f)
> (or/c location? symbol? #f)
> symbol?
> (listof attribute?)
> (listof
> (or/c
> permissive/c
> pcdata?
> element?
> entity?
> comment?
> cdata?
> p-i?))
> element?)
> on make-element; not in permissive mode
>
> === context ===
> C:\cygwin\home\robby\svn\exp\plt\collects\scheme\private\contract-guts.ss:220:0:
> raise-contract-error
> C:\cygwin\home\robby\svn\exp\plt\collects\scheme\private\map.ss:22:17: loop
> C:\cygwin\home\robby\svn\exp\plt\collects\scheme\private\contract-arrow.ss:1347:3
> C:\cygwin\home\robby\svn\exp\plt\collects\xml\private\reader.ss:89:4:
> read-content
> C:\cygwin\home\robby\svn\exp\plt\collects\xml\private\reader.ss:89:4:
> read-content
> C:\cygwin\home\robby\svn\exp\plt\collects\xml\private\reader.ss:24:2: read-xml
> C:\cygwin\home\robby\svn\exp\plt\collects\stepper\private\xml-snip-helpers.ss:52:7
> C:\cygwin\home\robby\svn\exp\plt\collects\syntax\module-reader.ss:87:19: loop
> C:\cygwin\home\robby\svn\exp\plt\collects\syntax\module-reader.ss:78:0:
> wrap-internal
> C:\cygwin\home\robby\svn\exp\plt\collects\wxme\wxme.ss:665:2: do-read
> C:\cygwin\home\robby\svn\exp\plt\collects\wxme\wxme.ss:694:2: wxme-read-syntax
> C:\cygwin\home\robby\html\build-tree.scm:10:2: build-directory
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-dev
>
--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay
"The glory of God is Intelligence" - D&C 93