Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cover calls interval-map-set! with illegal args #112

Closed
jbclements opened this issue Jan 19, 2016 · 4 comments
Closed

cover calls interval-map-set! with illegal args #112

jbclements opened this issue Jan 19, 2016 · 4 comments
Assignees
Labels

Comments

@jbclements
Copy link
Contributor

I've been working on getting the sxml tests working, and I thought I'd run cover to see how things looked. Unfortunately, it looks like calling raco pkg cover -p sxml makes a call to interval-map-set! with an interval where the end is before the start.

I'm guessing I could reduce this test case, but I'm tired and going to bed: I'm running on push df51297dac15abb4ef026c of github.com/jbclements/sxml (a.k.a. the current pkgs.racket-lang.org)

pajaro2:~/sxml (git)-[master]- clements> raco cover -p sxml
cover: instrumenting: /Users/clements/sxml/info.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ddo-axes.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ddo-txpath.rkt
cover: instrumenting: /Users/clements/sxml/sxml/info.rkt
cover: instrumenting: /Users/clements/sxml/sxml/lazy-ssax.rkt
cover: instrumenting: /Users/clements/sxml/sxml/lazy-xpath.rkt
cover: instrumenting: /Users/clements/sxml/sxml/main.rkt
cover: instrumenting: /Users/clements/sxml/sxml/modif.rkt
cover: instrumenting: /Users/clements/sxml/sxml/scribblings/all-exported.scrbl
cover: instrumenting: /Users/clements/sxml/sxml/scribblings/extract-provides.rkt
cover: instrumenting: /Users/clements/sxml/sxml/scribblings/extracted-sperber.scrbl
cover: instrumenting: /Users/clements/sxml/sxml/scribblings/sax-parsing.scrbl
cover: instrumenting: /Users/clements/sxml/sxml/scribblings/serialization.scrbl
cover: instrumenting: /Users/clements/sxml/sxml/scribblings/sxml-rep.scrbl
cover: instrumenting: /Users/clements/sxml/sxml/scribblings/sxml.scrbl
cover: instrumenting: /Users/clements/sxml/sxml/scribblings/sxpath.scrbl
cover: instrumenting: /Users/clements/sxml/sxml/scribblings/sxslt.scrbl
cover: instrumenting: /Users/clements/sxml/sxml/scribblings/util.rkt
cover: instrumenting: /Users/clements/sxml/sxml/serializer.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/SSAX-code.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/SXML-tree-trans.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/access-remote.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/errors-and-warnings.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/id.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/info.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/input-parse.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/multi-parser.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/myenv.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/parse-error.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/ssax-prim.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/ssax.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/sxpathlib.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/tests/vinput-parse.scm
cover: instrumenting: /Users/clements/sxml/sxml/ssax/util.rkt
cover: instrumenting: /Users/clements/sxml/sxml/ssax/xlink-parser.rkt
cover: instrumenting: /Users/clements/sxml/sxml/sxml-tools.rkt
cover: instrumenting: /Users/clements/sxml/sxml/sxpath-ext.rkt
cover: instrumenting: /Users/clements/sxml/sxml/sxpath.rkt
cover: instrumenting: /Users/clements/sxml/sxml/tests/ssax-tests.rkt
cover: instrumenting: /Users/clements/sxml/sxml/tests/tests.rkt
cover: instrumenting: /Users/clements/sxml/sxml/tests/vSXML-to-HTML.rkt
cover: instrumenting: /Users/clements/sxml/sxml/tests/vSXML-tree-trans.rkt
cover: instrumenting: /Users/clements/sxml/sxml/txpath.rkt
cover: instrumenting: /Users/clements/sxml/sxml/xpath-ast.rkt
cover: instrumenting: /Users/clements/sxml/sxml/xpath-context_xlink.rkt
cover: instrumenting: /Users/clements/sxml/sxml/xpath-parser.rkt
cover: running file: /Users/clements/sxml/info.rkt
cover: running file: /Users/clements/sxml/sxml/ddo-axes.rkt
cover: running file: /Users/clements/sxml/sxml/ddo-txpath.rkt
cover: running file: /Users/clements/sxml/sxml/info.rkt
cover: running file: /Users/clements/sxml/sxml/lazy-ssax.rkt
cover: running file: /Users/clements/sxml/sxml/lazy-xpath.rkt
cover: running file: /Users/clements/sxml/sxml/main.rkt
cover: running file: /Users/clements/sxml/sxml/modif.rkt
cover: running file: /Users/clements/sxml/sxml/scribblings/all-exported.scrbl
cover: running file: /Users/clements/sxml/sxml/scribblings/extract-provides.rkt
'((section "myenv.rkt") (#%provide cerr nl ++! --! cout ++ push! -- cond-expand whennot inc dec myenv:error cons* assert) (section "util.rkt") (#%provide substring? string->integer make-char-quotator string-rindex list-tail-diff list-intersperse any? string-split) (section "parse-error.rkt") (#%provide parser-error ssax:warn) (section "input-parse.rkt") (#%provide peek-next-char assert-curr-char skip-until-char skip-while input-parse:init-buffer next-token next-token-of find-string-from-port? ascii->char ucscode->char char-return char-tab char-newline char-space) (section "SSAX-code.rkt") (#%provide ssax:make-parser/positional-args ssax:reverse-collect-str ssax:xml->sxml ssax:reverse-collect-str-drop-ws ssax:make-parser ssax:define-labeled-arg-macro make-xml-token xml-token? xml-token-kind xml-token-head fold ssax:S-chars ssax:skip-S ssax:ncname-starting-char? ssax:read-NCName ssax:read-QName ssax:Prefix-XML ssax:skip-pi ssax:skip-internal-dtd string-whitespace? ssax:read-cdata-body assq-values ssax:read-char-ref fold-right ssax:predefined-parsed-entities ssax:handle-parsed-entity make-empty-attlist attlist-add attlist-null? attlist-remove-top attlist->alist name-compare attlist-fold ssax:largest-unres-name ssax:read-attributes ssax:read-markup-token ssax:resolve-name ssax:read-pi-body-as-string ssax:uri-string->symbol ssax:complete-start-tag ssax:read-external-id ssax:scan-Misc ssax:assert-token ssax:read-char-data ssax:make-pi-parser ssax:make-elem-parser) (section "SXML-tree-trans.rkt") (#%provide pre-post-order replace-range SRV:send-reply post-order) (section "sxpathlib.rkt") (#%provide nodeset? as-nodeset sxml:element? sxml:complement node-eq? node-equal? node-pos sxml:filter take-until take-after map-union node-reverse node-trace select-kids node-self ntype-names?? ntype?? ntype-namespace-id?? node-or node-closure sxml:node? sxml:attr-list sxml:attribute sxml:child sxml:parent node-parent sxml:child-nodes sxml:child-elements node-join node-reduce) (section "access-remote.rkt") (#%provide open-input-resource ar:resource-type ar:resolve-uri-according-base) (section "id.rkt") (#%provide id:make-seed id:new-level-seed-handler id:finish-element-handler id:doctype-handler id:ending-action) (section "xlink-parser.rkt") (#%provide xlink:namespace-uri xlink:linkbase-uri xlink:make-small-seed xlink:make-full-seed xlink:seed-mode xlink:seed-sxlink-arcs xlink:seed-sxpointer xlink:seed-stack xlink:seed-locators+resources xlink:seed-arcs xlink:seed-declared-labels xlink:add-simple xlink:add-extended xlink:sxpointer->childseq xlink:sxpointer4sibling xlink:make-locator-or-resource xlink:resource-label xlink:resource-data xlink:add-locator xlink:add-resource xlink:make-arc-info xlink:arc-info-from xlink:arc-info-to xlink:arc-info-linkbase xlink:arc-info-position xlink:arc-info-data xlink:add-arc xlink:add-declared-label xlink:all-labels-declared xlink:construct-xlink-values xlink:values-type xlink:values-href xlink:values-role xlink:values-arcrole xlink:values-title xlink:values-show xlink:values-actuate xlink:values-label xlink:values-from xlink:values-to xlink:read-attributes xlink:add-default-arc xlink:read-SXML-attributes xlink:check-helper xlink:check-type-show-actuate-constraints xlink:general-start xlink:general-end xlink:none-start xlink:none-end xlink:simple-start xlink:simple-end xlink:extended-start xlink:extended-end xlink:locator-start xlink:locator-end xlink:resource-start xlink:resource-end xlink:arc-start xlink:arc-end xlink:get-port-position xlink:parser-error xlink:branch-helper xlink:replace-branch xlink:append-branch xlink:get-uri xlink:set-uri-for-sxlink-arcs xlink:new-level-seed-handler xlink:finish-element-handler xlink:ending-action SXML->SXML+xlink SHTML->SHTML+xlink) (section "ssax-prim.rkt") (#%provide reverse-collect-str-drop-ws reverse-collect-str RES-NAME->SXML) (section "multi-parser.rkt") (#%provide ssax:multi-parser parent:new-level-seed-handler parent:construct-element))
cover: running file: /Users/clements/sxml/sxml/scribblings/extracted-sperber.scrbl
cover: running file: /Users/clements/sxml/sxml/scribblings/sax-parsing.scrbl
cover: running file: /Users/clements/sxml/sxml/scribblings/serialization.scrbl
cover: running file: /Users/clements/sxml/sxml/scribblings/sxml-rep.scrbl
cover: running file: /Users/clements/sxml/sxml/scribblings/sxml.scrbl
cover: running file: /Users/clements/sxml/sxml/scribblings/sxpath.scrbl
cover: running file: /Users/clements/sxml/sxml/scribblings/sxslt.scrbl
cover: running file: /Users/clements/sxml/sxml/scribblings/util.rkt
cover: running file: /Users/clements/sxml/sxml/serializer.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/SSAX-code.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/SXML-tree-trans.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/access-remote.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/errors-and-warnings.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/id.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/info.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/input-parse.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/multi-parser.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/myenv.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/parse-error.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/ssax-prim.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/ssax.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/sxpathlib.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/tests/vinput-parse.scm
#t
#t
'(#\newline *eof*)
cover: running file: /Users/clements/sxml/sxml/ssax/util.rkt
cover: running file: /Users/clements/sxml/sxml/ssax/xlink-parser.rkt
cover: running file: /Users/clements/sxml/sxml/sxml-tools.rkt
cover: running file: /Users/clements/sxml/sxml/sxpath-ext.rkt
cover: running file: /Users/clements/sxml/sxml/sxpath.rkt
cover: running file: /Users/clements/sxml/sxml/tests/ssax-tests.rkt
10 success(es) 0 failure(s) 0 error(s) 10 test(s) run
0
cover: running file: /Users/clements/sxml/sxml/tests/tests.rkt
15 success(es) 0 failure(s) 0 error(s) 15 test(s) run
0
cover: running file: /Users/clements/sxml/sxml/tests/vSXML-to-HTML.rkt
3 success(es) 0 failure(s) 0 error(s) 3 test(s) run
0
cover: running file: /Users/clements/sxml/sxml/tests/vSXML-tree-trans.rkt
6 success(es) 0 failure(s) 0 error(s) 6 test(s) run
0
cover: running file: /Users/clements/sxml/sxml/txpath.rkt
cover: running file: /Users/clements/sxml/sxml/xpath-ast.rkt
cover: running file: /Users/clements/sxml/sxml/xpath-context_xlink.rkt
cover: running file: /Users/clements/sxml/sxml/xpath-parser.rkt
dumping coverage info into "coverage"
interval-map-set!: start is not strictly less than end
  im: #<interval-map>
  start: 2162
  end: 2161
  value: 'irrelevant
  context...:
   /Users/clements/plt/racket/share/pkgs/data-lib/data/interval-map.rkt:76:0: interval-map-set!
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/format-utils.rkt:86:2: loop
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/format-utils.rkt:50:6: temp4
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/format-utils.rkt:44:0: coverage-cache-file
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/format-utils.rkt:29:0: make-covered?
   /Users/clements/plt/racket/collects/racket/private/more-scheme.rkt:373:13: hash-ref!
   /Users/clements/plt/racket/share/pkgs/cover/cover/cover.rkt:330:5
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/html/html.rkt:406:4: recur
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/html/html.rkt:383:0: expression-coverage/file
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/html/html.rkt:145:0: make-html-file
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/html/html.rkt:52:4: for-loop
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/html/html.rkt:46:0: get-files
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/html/html.rkt:30:0: generate-html-coverage
   /Users/clements/plt/racket/share/pkgs/cover/cover/raco.rkt:83:4
   /Users/clements/plt/racket/share/pkgs/cover/cover/private/shared.rkt:28:0: with-intercepted-logging
   (submod /Users/clements/plt/racket/share/pkgs/cover/cover/raco.rkt main): [running body]
   ...
@florence
Copy link
Owner

It looks like this is cover fighting with the scribble parser again. The error happens when building the coverage cache for sxml/sxml/scribblings/sxpath.scrbl

I dont have time to fix this right now, but as a workaround you can use -bp or -n scribblings -p instead of -p. This will exclude your scribblings directory from the coverage report (while still running them for the purpose of generating coverage).

@jbclements
Copy link
Contributor Author

On Jan 19, 2016, at 8:39 AM, Spencer Florence notifications@github.com wrote:

It looks like this is cover fighting with the scribble parser again. The error happens when building the coverage cache for sxml/sxml/scribblings/sxpath.scrbl

I dont have time to fix this right now, but as a workaround you can use -bp instead of -p. This will exclude your scribblings directory from the coverage report (while still running them for the purpose of generating coverage).

Excellent, your workaround was lovely. Is this scribble’s fault, for producing a syntax object whose end is before its beginning? If this is a scribble bug, I’d be happy to report it to the main repo.

John

@florence
Copy link
Owner

that requires more investigation. Even if it is a scribble bug cover should
give a better error message

On Tue, Jan 19, 2016, 3:34 PM John Clements notifications@github.com
wrote:

On Jan 19, 2016, at 8:39 AM, Spencer Florence notifications@github.com
wrote:

It looks like this is cover fighting with the scribble parser again. The
error happens when building the coverage cache for
sxml/sxml/scribblings/sxpath.scrbl

I dont have time to fix this right now, but as a workaround you can use
-bp instead of -p. This will exclude your scribblings directory from the
coverage report (while still running them for the purpose of generating
coverage).

Excellent, your workaround was lovely. Is this scribble’s fault, for
producing a syntax object whose end is before its beginning? If this is a
scribble bug, I’d be happy to report it to the main repo.

John


Reply to this email directly or view it on GitHub
#112 (comment).

@florence florence added the bug label Feb 3, 2016
@florence florence self-assigned this Feb 3, 2016
@florence
Copy link
Owner

florence commented Mar 5, 2016

Fixed by 09290b4

It turns out that sxml would set port-count-lines-enabled ( https://github.com/jbclements/sxml/blob/df51297dac15abb4ef026c2549f137aabaa1738e/sxml/ssax/input-parse.rkt#L254 ) which broke how cover handles coverage on multibyte characters.

@florence florence closed this as completed Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants