default   Racket Bugs
Main PageQuick QueryStandard QueryAdvanced QueryHelp
Log in

View Problem Report: 11012

send email to interested parties or send email followup to audit-trail
Reporter's email: samth at ccs dot neu dot edu
Number: 11012
Category: mzscheme
Synopsis: error in `compile-file'
Class: not-a-bug
Responsible: jay
Notify-List:
Severity: serious
Priority: medium
State: closed
Confidential: no
Arrival-Date: Fri Jul 02 18:36:01 -0400 2010
Closed-Date: Thu Jul 15 12:10:05 -0400 2010
Last-Modified: Fri Sep 03 21:01:54 -0400 2010
Originator: Sam TH
Organization: plt
Submitter-Id: unknown
Release: 5.0.0.3--2010-07-02(8fc7f93/g)
Environment: unix "Linux punge 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux" (i386-linux/3m) (get-display-depth) = 24
Human Language: english
(current-memory-use) 411401280

Collections:
(("/home/samth/.racket/5.0.0.3/collects" non-existent-path) ("/home/samth/sw/plt/collects" "honu" "eopl" "tests" "typed" "test-engine" "errortrace" "sgl" "plot" "combinator-parser" "mzcom" "test-box-recovery" "version" ".gitignore" "defaults" "deinprogramm" "s-exp" "handin-client" "srpersist" "launcher" "scriblib" "browser" "unstable" "tool" "r5rs" "rico" "gui-debugger" "at-exp" "swindle" "scheme" "reader" "frtime" "meta" "racket" "file" "racklog" "slatex" "net" "wxme" "syntax" "scribblings" "parser-tools" "ffi" "hierlist" "handin-server" "2htdp" "framework" "openssl" "dynext" "datalog" "slideshow" "games" "raco" "xml" "texpict" "graphics" "mzscheme" "profile" "help" "web-server" "schelog" "rktunit" "trace" "make" "algol60" "mzlib" "rackunit" "icons" "plai" "sirmail" "lazy" "mrlib" "setup" "racunit" "string-constants" "syntax-color" "r6rs" "repos-time-stamp" "drscheme" "lang" "repo-time-stamp" "afm" "planet" "typed-scheme" "info-domain" "config" "guibuilder" "stepper" "mred"!
  "raclog" "embedded-gui" "preprocessor" "readline" "htdp" "compiler" "srfi" "waterworld" "macro-debugger" "html" "scribble" "mysterx" "redex" "drracket" "rnrs" "teachpack" "tex2page" "schemeunit"))
Computer Language: (("Determine language from source") (#(#t print mixed-fraction-e #f #t none) (default) #() "#lang racket\n" #t))
Description: The program below produces the following error:

mzlib/compile.rkt:9:2: build-path: expects type <path, string, 'up, 'same> as 1st argument, given: #f; other arguments were: "compiled"

#lang racket

(require mzlib/compile)
(define (scheme-file? s)
    (regexp-match ".*[.](rkt|ss|scm)" (path->string s)))
(define (compile-benchmarks)
    (define (find dir)
      (for/list ([d (directory-list dir)]
                 #:when (scheme-file? d))
        d))
    (define shootout (find (collection-path "tests" "racket" "benchmarks" "shootout" "typed")))
    (define common (find (collection-path "tests" "racket" "benchmarks" "common" "typed")))
    (define shootout-tests
      (list "compiling"
            (for/list ([p (append shootout common)])
              (list (path->string p)
                    (list (compile-file p))))))
    shootout-tests
    )
(compile-benchmarks)
File Attachments:
How-To-Repeat:
Fix: This program is buggy. The paths returned by directory-list are baseless paths... ie #<path:ackermann-non-optimizing.rkt> rather than something like #<path:/Users/jay/Dev/scm/plt/collects/tests/racket/benchmarks/shootout/typed/ackermann-non-optimizing.rkt>. Thus 'p' does not refer to any actual file.

There should be a better error message and I've started a discussion about it.

For now, change 'd' in the for/list to '(build-path dir d)' and it will work.

Release-Note:
Unformatted:

send email to interested parties or send email followup to audit-trail

Audit Trail:

Class changed from "sw-bug" to "not-a-bug" by jay at Thu, 15 Jul 2010 12:10:05 -0400
Reason>>> See fix

State changed from "open" to "closed" by jay at Thu, 15 Jul 2010 12:10:05 -0400
Reason>>> See fix


Responsible changed from "nobody" to "jay" by eli at Fri, 03 Sep 2010 21:01:54 -0400
Reason>>> Jay closed