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

Problem: We're very unfriendly when you point at a non-package directory #200

Open
clacke opened this issue Sep 4, 2018 · 0 comments
Open

Comments

@clacke
Copy link
Member

clacke commented Sep 4, 2018

$ ./racket2nix --thin /tmp
extract-pkg-dependencies: contract violation
  expected: a procedure
  given: #f
  in: the 1st argument of
      (->*
       ((-> symbol? (-> any/c) any/c))
       (#:build-deps?
        boolean?
        #:filter?
        boolean?
        #:versions?
        boolean?)
       (listof
        (or/c
         string?
         (cons/c string? (listof any/c)))))
  contract from: <collects>/pkg/lib.rkt
  blaming: (/home/clacke/git/fractalide/racket2nix/nix/racket2nix.rkt main)
   (assuming the contract is correct)
  at: <collects>/pkg/lib.rkt:270.3
  context...:
   /nix/store/di03ll58yqr8bg2c47j70pgnrx2i5qwy-racket-7.0/share/racket/collects/racket/contract/private/blame.rkt:347:0: raise-blame-error16
   /nix/store/di03ll58yqr8bg2c47j70pgnrx2i5qwy-racket-7.0/share/racket/collects/racket/contract/private/arrow-val-first.rkt:431:5: mk-call
   /nix/store/di03ll58yqr8bg2c47j70pgnrx2i5qwy-racket-7.0/share/racket/collects/racket/contract/private/arrow-val-first.rkt:428:3
   /home/clacke/git/fractalide/racket2nix/nix/racket2nix.rkt:786:29
   (submod "/home/clacke/git/fractalide/racket2nix/nix/racket2nix.rkt" main): [running body]
   for-loop
   run-module-instance!125

(not isolated to the --thin mode, this has been there from day 0)

Solution: When (get-info/full) returns #f, raise a user error explaining that there's no valid info.rkt.

clacke added a commit to clacke/xin that referenced this issue Sep 10, 2018
Solution: Move info.rkt to the appropriate directory.

This one was hard to spot for someone not the author of racket2nix
because fractalide/racket2nix#200 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant