{"action":"created","issue":{"url":"https://api.github.com/repos/racket/typed-racket/issues/463","repository_url":"https://api.github.com/repos/racket/typed-racket","labels_url":"https://api.github.com/repos/racket/typed-racket/issues/463/labels{/name}","comments_url":"https://api.github.com/repos/racket/typed-racket/issues/463/comments","events_url":"https://api.github.com/repos/racket/typed-racket/issues/463/events","html_url":"https://github.com/racket/typed-racket/issues/463","id":192547937,"number":463,"title":"Bad error messages in “typed/rackunit”","user":{"login":"leafac","id":586813,"avatar_url":"https://avatars.githubusercontent.com/u/586813?v=3","gravatar_id":"","url":"https://api.github.com/users/leafac","html_url":"https://github.com/leafac","followers_url":"https://api.github.com/users/leafac/followers","following_url":"https://api.github.com/users/leafac/following{/other_user}","gists_url":"https://api.github.com/users/leafac/gists{/gist_id}","starred_url":"https://api.github.com/users/leafac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leafac/subscriptions","organizations_url":"https://api.github.com/users/leafac/orgs","repos_url":"https://api.github.com/users/leafac/repos","events_url":"https://api.github.com/users/leafac/events{/privacy}","received_events_url":"https://api.github.com/users/leafac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-30T11:59:57Z","updated_at":"2016-11-30T12:48:55Z","closed_at":null,"body":"### What version of Racket are you using?\r\n\r\n6.7.\r\n\r\n### What program did you run?\r\n\r\n```\r\n#lang typed/racket\r\n(require typed/rackunit)\r\n \r\n(check-not-false (= 1 2))\r\n\r\n=>\r\n\r\n    - : Any\r\n\r\n    --------------------\r\n    FAILURE\r\n    name:       check-not-false\r\n    location:   (#<path:/home/pasterack/racket66/share/pkgs/typed-racket-more/typed/rackunit/main.rkt> 41 2 907 15)\r\n    expression: (check-not-false expr129)\r\n    params:     (#f)\r\n    Check failure\r\n    --------------------\r\n```\r\n\r\n### What should have happened?\r\n\r\n1. `location` should point to the failed assertion.\r\n2. `expression` should contain the original expression.\r\n\r\nThe following **untyped** program illustrates the expected output:\r\n\r\n```\r\n#lang racket\r\n(require rackunit)\r\n \r\n(check-not-false (= 1 2))\r\n\r\n=>\r\n\r\n    --------------------\r\n    FAILURE\r\n    name:       check-not-false\r\n    location:   (eval 2 0 2 1)\r\n    expression: (check-not-false (= 1 2))\r\n    params:     (#f)\r\n    Check failure\r\n    --------------------\r\n```"},"comment":{"url":"https://api.github.com/repos/racket/typed-racket/issues/comments/263865448","html_url":"https://github.com/racket/typed-racket/issues/463#issuecomment-263865448","issue_url":"https://api.github.com/repos/racket/typed-racket/issues/463","id":263865448,"user":{"login":"jsmaniac","id":299872,"avatar_url":"https://avatars.githubusercontent.com/u/299872?v=3","gravatar_id":"","url":"https://api.github.com/users/jsmaniac","html_url":"https://github.com/jsmaniac","followers_url":"https://api.github.com/users/jsmaniac/followers","following_url":"https://api.github.com/users/jsmaniac/following{/other_user}","gists_url":"https://api.github.com/users/jsmaniac/gists{/gist_id}","starred_url":"https://api.github.com/users/jsmaniac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsmaniac/subscriptions","organizations_url":"https://api.github.com/users/jsmaniac/orgs","repos_url":"https://api.github.com/users/jsmaniac/repos","events_url":"https://api.github.com/users/jsmaniac/events{/privacy}","received_events_url":"https://api.github.com/users/jsmaniac/received_events","type":"User","site_admin":false},"created_at":"2016-11-30T12:48:55Z","updated_at":"2016-11-30T12:48:55Z","body":"@leafac I have implemented some wrappers in [my personal toolkit](https://github.com/jsmaniac/phc-toolkit/blob/master/typed-rackunit.rkt#L39) (see https://github.com/racket/typed-racket/issues/54#issuecomment-244732072 for another issue that these wrapper solve).\r\n\r\nAs a quick fix, you can use `(require phc-toolkit/typed-rackunit)`, although I haven't overridden all forms from `typed/rackunit` yet.\r\n\r\n```racket\r\n#lang typed/racket/base\r\n\r\n(require phc-toolkit/typed-rackunit)\r\n\r\n(check-not-false: (= 1 2))\r\n\r\n=>\r\n\r\n    --------------------\r\n    FAILURE\r\n    actual:     \"#f\"\r\n    expected:   \"#t\"\r\n    name:       check-not-false:\r\n    location:   (unsaved-editor 5 0 64 26)\r\n    expression: (check-not-false: (= 1 2))\r\n    \r\n    Check failure\r\n    --------------------\r\n```\r\n\r\nIf you are willing to merge these into `typed/rackunit`, it would be great! Otherwise I'll do it eventually, but I don't have enough time right now."}}
{"actor":{"display_login":"jsmaniac"}}