racket / typed-racket

Typed Racket
Other
525 stars 105 forks source link

Parallel builds fail with (require something (submod ".." foo)) #292

Open SuzanneSoy opened 8 years ago

SuzanneSoy commented 8 years ago
#lang racket

(module a typed/racket)

(module* b typed/racket
  (require racket/list ;; Any library can be required here
           (submod ".." a)))

When building the file above with -j 2 (or more) for the first time, i.e. after having removed the compiled/ folder, I get the following error:

$ rm compiled/ -fr && raco make -j 2 bug.rkt 
 0 error compiling /tmp/..
build-path: contract violation
  expected: (or/c path-for-some-system? path-string? 'up 'same)
  given: #f
  argument position: 1st
  other arguments...:
   #<path:compiled>
  context...:
   /usr/local/racket-6.4.0.1/collects/compiler/compilation-path.rkt:7:0: do-get-compilation-dir+name
   /usr/local/racket-6.4.0.1/collects/compiler/cm.rkt:633:2: do-check
   /usr/local/racket-6.4.0.1/collects/compiler/cm.rkt:713:4
   /usr/local/racket-6.4.0.1/collects/setup/../racket/private/more-scheme.rkt:261:28
   /usr/local/racket-6.4.0.1/collects/setup/../racket/private/more-scheme.rkt:261:28
   /usr/local/racket-6.4.0.1/collects/setup/parallel-do.rkt:435:20: loop

I can consistently reproduce it on my machine, and on travis-ci too.

SuzanneSoy commented 8 years ago

On a recent version of racket (6.4.0.8), when compiling /home/me/path/to/bug.rkt the error message is:

open-input-file: cannot open directory as a file
  path: /home/me/path/to/
  system error: errno=?
  compilation context...:
   /home/me/path/to/
  context...:
   /nix/store/5xgyl65ilsmgzv8qc8y9s1zi0xy37kx4-racket-6.4.0.8/share/racket/collects/syntax/modcode.rkt:264:5: compile-one
   /nix/store/5xgyl65ilsmgzv8qc8y9s1zi0xy37kx4-racket-6.4.0.8/share/racket/collects/compiler/cm.rkt:346:0: compile-zo*
   /nix/store/5xgyl65ilsmgzv8qc8y9s1zi0xy37kx4-racket-6.4.0.8/share/racket/collects/compiler/cm.rkt:561:26
   /nix/store/5xgyl65ilsmgzv8qc8y9s1zi0xy37kx4-racket-6.4.0.8/share/racket/collects/setup/../racket/private/more-scheme.rkt:261:28
   /nix/store/5xgyl65ilsmgzv8qc8y9s1zi0xy37kx4-racket-6.4.0.8/share/racket/collects/setup/parallel-do.rkt:435:20: loop
 1 made bug.rkt