Re: [racket-dev] #f instead of path-string? when (require cKanren)
I'm not able to reproduce this bug, but it appears that the value of the current-load/use-compiled parameter is being passed #f for a first argument. The code in DrRacket seems to assume that things like this will raise errors: (parameterize ([current-load/use-compiled void]) ((current-load/use-compiled) #f #f)) but I see they don't so it seems entirely plausible that something is passing #f in there when it shouldn't be somewhere. I think one might reasonably consider the missing check to be a bug in racket, but I'm not sure how easy it is to fix. Also unfortunately, there is potentially a lot going on in between the drracket/private/rep.rkt step in the stacktrace and the drracket\private\eval-helpers.rkt step so I'm a bit stuck right now. Robby On Thu, Oct 2, 2014 at 11:05 AM, A.J. Lepper wrote: > Windows 64-bit, Racket v6.1 64-bit > > If I install cKanren from the package manager then (require cKanren) works > fine in Racket.exe from the command prompt, but produces an error in > DrRacket. simple-form-path receives #f instead of a path-string?, from > file-stamp-in-paths. Adding a [(false? (car paths)) #f] clause to the outer > cond stops the error, but may not be a good fix - I got a bit lost digging > through the stack above it and went for the easy option. I've attached the > backtrace. > > Thanks very much, > -Angus. > > _ > Racket Developers list: > http://lists.racket-lang.org/dev > _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] #f instead of path-string? when (require cKanren)
Do we have a github issue tracker for drracket? Robby On Sat, Oct 4, 2014 at 5:48 PM, Matthias Felleisen wrote: > > Could you use the github issue tracker to submit this? Thanks -- Matthias > > https://github.com/calvis/cKanren > > > > On Oct 2, 2014, at 12:05 PM, A.J. Lepper wrote: > >> Windows 64-bit, Racket v6.1 64-bit >> >> If I install cKanren from the package manager then (require cKanren) works >> fine in Racket.exe from the command prompt, but produces an error in >> DrRacket. simple-form-path receives #f instead of a path-string?, from >> file-stamp-in-paths. Adding a [(false? (car paths)) #f] clause to the outer >> cond stops the error, but may not be a good fix - I got a bit lost digging >> through the stack above it and went for the easy option. I've attached the >> backtrace. >> >> Thanks very much, >> -Angus. >> _ >> Racket Developers list: >> http://lists.racket-lang.org/dev > > > _ > Racket Developers list: > http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] #f instead of path-string? when (require cKanren)
Could you use the github issue tracker to submit this? Thanks -- Matthias https://github.com/calvis/cKanren On Oct 2, 2014, at 12:05 PM, A.J. Lepper wrote: > Windows 64-bit, Racket v6.1 64-bit > > If I install cKanren from the package manager then (require cKanren) works > fine in Racket.exe from the command prompt, but produces an error in > DrRacket. simple-form-path receives #f instead of a path-string?, from > file-stamp-in-paths. Adding a [(false? (car paths)) #f] clause to the outer > cond stops the error, but may not be a good fix - I got a bit lost digging > through the stack above it and went for the easy option. I've attached the > backtrace. > > Thanks very much, > -Angus. > _ > Racket Developers list: > http://lists.racket-lang.org/dev _ Racket Developers list: http://lists.racket-lang.org/dev
[racket-dev] #f instead of path-string? when (require cKanren)
Windows 64-bit, Racket v6.1 64-bit If I install cKanren from the package manager then (require cKanren) works fine in Racket.exe from the command prompt, but produces an error in DrRacket. simple-form-path receives #f instead of a path-string?, from file-stamp-in-paths. Adding a [(false? (car paths)) #f] clause to the outer cond stops the error, but may not be a good fix - I got a bit lost digging through the stack above it and went for the easy option. I've attached the backtrace. Thanks very much, -Angus. simple-form-path: contract violation expected: path-string? given: #f C:\Program Files\Racket\collects\racket\path.rkt: 14:0 (define (simple-form-path p) (unless (path-string? p) (raise-argument-error 'simple-form-path "path-string?" p)) (simplify-path (path->complete-path p))) C:\Program Files\Racket\collects\compiler\cm.rkt: 51:4 (let c-loop ([paths paths]) (cond [(null? paths) #f] ;;[(false? (car paths)) #f] [else (let i-loop ([collects-eles (explode-path (simple-form-path (car paths)))] [p-eles p-eles]) (cond [(null? collects-eles) ;; we're inside the collection hierarchy, so we just ;; use the date of the original file (or the zo, whichever ;; is newer). (let-values ([(base name dir) (split-path p)]) (let* ([p-date (file-or-directory-modify-seconds p #f (lambda () #f))] [alt-date (and (not p-date) (file-or-directory-modify-seconds (rkt->ss p) #f (lambda () #f)))] [date (or p-date alt-date)] [get-path (lambda () (if p-date p (rkt->ss p)))] [modes (use-compiled-file-paths)] [roots (current-compiled-file-roots)] [get-zo-date+mode (lambda (name) (ormap (lambda (root) (ormap (lambda (mode) (let ([v (file-or-directory-modify-seconds (build-path (reroot-path* base root) mode (path-add-suffix name #".zo")) #f (lambda () #f))]) (and v (list* v mode root modes)) roots))] [main-zo-date+mode (and (or p-date (not alt-date)) (get-zo-date+mode name))] [alt-zo-date+mode (and (or alt-date (and (not p-date) (not alt-date) (not main-zo-date+mode))) (get-zo-date+mode (rkt->ss name)))] [zo-date+mode (or main-zo-date+mode alt-zo-date+mode)] [zo-date (and zo-date+mode (car zo-date+mode))] [get-zo-path (lambda () (let-values ([(name mode root) (if main-zo-date+mode (values (path-add-suffix name #".zo") (cadr main-zo-date+mode) (cddr main-zo-date+mode)) (values (path-add-suffix (rkt->ss name) #".zo") (cadr alt-zo-date+mode) (cddr alt-zo-date+mode)))]) (build-path (reroot-path* base root) mode name)))]) (cond [(and zo-date (or (not date) (zo-date . > . date))) (cons zo-date (delay (get-compiled-file-sha1 (get-zo-path] [date (cons date (delay (get-source-sha1