mbutterick / pollen-tfl

Commented Pollen sample project [mirror of https://git.matthewbutterick.com/mbutterick/pollen-tfl]
https://git.matthewbutterick.com/mbutterick/pollen-tfl
66 stars 8 forks source link

servlet error when http://localhost:8080/toc.html #1

Closed shen390s closed 8 years ago

shen390s commented 8 years ago
  1. Install pollen and depended pkgs (racket 6.4 @OSX 10.11.3)
  2. git clone https://github.com/mbutterick/pollen-tfl.git
  3. cd pollen-tcl
  4. taco pollen start
  5. https://github.com/mbutterick/pollen-tfl.git

Error information request: /toc.html rendering: /toc.html.pm as /toc.html Servlet (@ /toc.html) exception: decode-elements: contract violation expected: txexpr-elements? given: '((div ((class "hanging-topic") (hyphens "none")) (h3 ((class "topic")) "small caps") (p ((hyphens "none")) "Use real small caps; avoid fakes")) "\n" "\n" (em "Small caps") " are short capital letters designed to blend with lowercase text. They’re usually slightly taller than lowercase letters. (Small caps are used in this book to denote " (a ((hyphens "none") (class "xref") (href)) "cross-references") ".)" "\n" "\n" "I’m a big fan of small caps. They look great and they’re very useful as an alternative to " (a ((hyphens "none") (class "xref") (href "bold-or-italic.html")) "bold or italic") " or " (a ((hyphens "none") (class "xref") (href "all-caps.html")) "all caps") "." "\n" "\n" "But most people have never seen real small caps. They’ve only seen the ersatz small caps that word processors generate when small-cap formatting is used." "\n" "\n" (div ((class "omission"))) "\n" "\n" "Small-cap formatting works by scaling down regular caps. But compared to the other characters ... in: the 1st argument of (->* (txexpr-elements?) (#:block-txexpr-proc (-> block-txexpr? (or/c txexpr-element? txexpr-elements?))

:cdata-proc

    (->
     cdata?
     (or/c txexpr-element? txexpr-elements?))
    #:entity-proc
    (->
     (or/c symbol? valid-char?)
     (or/c txexpr-element? txexpr-elements?))
    #:exclude-attrs
    txexpr-attrs?
    #:exclude-tags
    txexpr-tags?
    #:inline-txexpr-proc
    (->
     txexpr?
     (or/c txexpr-element? txexpr-elements?))
    #:string-proc
    (->
     string?
     (or/c txexpr-element? txexpr-elements?))
    #:txexpr-attrs-proc
    (-> txexpr-attrs? txexpr-attrs?)
    #:txexpr-elements-proc
    (-> txexpr-elements? txexpr-elements?)
    #:txexpr-proc
    (->
     txexpr?
     (or/c txexpr-element? txexpr-elements?))
    #:txexpr-tag-proc
    (-> txexpr-tag? txexpr-tag?))
   (or/c txexpr-element? txexpr-elements?))

contract from:

/pollen/pollen/decode.rkt blaming: /Users/rshen/tmp/pollen-tfl/scribblings/pollen-rkt.scrbl (assuming the contract is correct) at: /pollen/pollen/decode.rkt:98.25 context...: /Applications/Racket v6.4/collects/racket/contract/private/blame.rkt:156:0: raise-blame-error16 /Applications/Racket v6.4/collects/racket/contract/private/arrow-val-first.rkt:338:5: mk-call /Applications/Racket v6.4/collects/racket/contract/private/arrow-val-first.rkt:335:3 /Users/rshen/tmp/pollen-tfl/scribblings/pollen-rkt.scrbl:781:7: root (submod /Users/rshen/tmp/pollen-tfl/small-caps.html.pm g49930): [running body] /Users/rshen/tmp/pollen-tfl/small-caps.html.pm: [traversing imports] /Users/rshen/Library/Racket/6.4/pkgs/pollen/pollen/private/cache-utils.rkt:33:0: path->hash /Users/rshen/Library/Racket/6.4/pkgs/pollen/pollen/private/cache-utils.rkt:76:14: temp16 /Applications/Racket v6.4/collects/file/cache.rkt:63:2: fetch-and-continue /Applications/Racket v6.4/collects/racket/contract/private/arrow-val-first.rkt:335:3 /Users/rshen/Library/Racket/6.4/pkgs/pollen/pollen/private/cache-utils.rkt:67:0: cache-ref! /Applications/Racket v6.4/collects/racket/private/more-scheme.rkt:373:13: hash-ref! /Users/rshen/Library/Racket/6.4/pkgs/pollen/pollen/cache.rkt:24:4: cached-require-base select-from-metas /Applications/Racket v6.4/collects/racket/contract/private/arrow-val-first.rkt:312:18 /Applications/Racket v6.4/collects/racket/private/norm-define.rkt:53:83: node->link ...
mbutterick commented 8 years ago

Thanks. This was a problem with the underlying pollen package, which I've now fixed. If you update pollen, it should work:

raco pkg update pollen

shen390s commented 8 years ago

Thanks

Rongsong