ntoronto / drbayes

Dr. Bayes
GNU Lesser General Public License v3.0
83 stars 11 forks source link

`raco pkg install` fails with clashing imports #6

Open mhuesch opened 8 years ago

mhuesch commented 8 years ago

Hi,

I was trying to build drbayes to play around with. Running raco pkg install results in lots of errors of this form:

drbayes/private/set/store.rkt:9:9: module: identifier already imported from: racket/list
  at: list-set
  in: "../utils.rkt"
  context...:
   /Applications/Racket v6.5/share/pkgs/typed-racket-lib/typed-racket/tc-setup.rkt:82:0: tc-module/full
   /Applications/Racket v6.5/share/pkgs/typed-racket-lib/typed-racket/typed-racket.rkt:24:4
   standard-module-name-resolver
   standard-module-name-resolver
   /Applications/Racket v6.5/share/pkgs/typed-racket-lib/typed-racket/tc-setup.rkt:82:0: tc-module/full
   /Applications/Racket v6.5/share/pkgs/typed-racket-lib/typed-racket/typed-racket.rkt:24:4
   /Applications/Racket v6.5/collects/compiler/cm.rkt:358:0: compile-zo*
   /Applications/Racket v6.5/collects/compiler/cm.rkt:566:26
   /Applications/Racket v6.5/collects/compiler/cm.rkt:558:42
   /Applications/Racket v6.5/collects/compiler/cm.rkt:630:2: do-check
   /Applications/Racket v6.5/collects/compiler/cm.rkt:763:4: compilation-manager-load-handler
   standard-module-name-resolver
   /Applications/Racket v6.5/share/pkgs/typed-racket-lib/typed-racket/tc-setup.rkt:82:0: tc-module/full
   /Applications/Racket v6.5/share/pkgs/typed-racket-lib/typed-racket/typed-racket.rkt:24:4
   /Applications/Racket v6.5/collects/compiler/cm.rkt:358:0: compile-zo*
   /Applications/Racket v6.5/collects/compiler/cm.rkt:566:26
   ...

It seems that the list-set function defined in utils.rkt clashes with something from racket/list. I realized that I could make the errors disappear by using (except-in racket/list list-set) in the requires of the files which signal errors. However this seems clunky, and I wonder if there is a more "rackety" way to do this (I am not very experienced with Racket). Re-export racket/list but hide list-set? Rename list-set to something else in utils.rkt? I am happy to implement your suggestion and make a PR.

jeapostrophe commented 8 years ago

The list-set that is now in racket/list does the same thing as the one in utils, so the thing to do is just remove it from utils and use the distribution one, IMHO.

mhuesch commented 8 years ago

@jeapostrophe Cool. Removing list-set from utils.rkt makes the package install with no errors. I'll submit a PR. Thanks!