haskell-mafia / mafia

Provides protection against cabal swindling, robbing, injuring or sabotaging people with chopsticks.
http://haskell-mafia.github.io/mafia/
BSD 3-Clause "New" or "Revised" License
135 stars 19 forks source link

`mafia install` accepts Cabal version constraints (for better or worse) #106

Open damncabbage opened 8 years ago

damncabbage commented 8 years ago

The following commands all work to install purescript version 0.8.5.0:

Two things:

With that aforementioned sequence, the following symlinks appear in ~/.ambiata/mafia/bin/:

purescript -> /Users/rhoward/.ambiata/mafia/packages/1/7.10.2/purescript-0.8.5.0-ab4bc21f6a195351e4fa59c180b26d530b9b726b
purescript == 0.8.5.* -> /Users/rhoward/.ambiata/mafia/packages/1/7.10.2/purescript-0.8.5.0-ab4bc21f6a195351e4fa59c180b26d530b9b726b
purescript == 0.8.5.0 -> /Users/rhoward/.ambiata/mafia/packages/1/7.10.2/purescript-0.8.5.0-f2f4205df16974a148c98d17e8af03267fc94500
purescript-0.8.5.0 -> /Users/rhoward/.ambiata/mafia/packages/1/7.10.2/purescript-0.8.5.0-f2f4205df16974a148c98d17e8af03267fc94500

(Yes, those are directory names with spaces in them.)

thumphries commented 8 years ago

nice

good buddy plink makes the mess https://github.com/ambiata/mafia/blob/master/src/Mafia/Bin.hs#L85

not sure if we understand InstallPackage as anything besides 'a string that cabal accepts'. might want to use a more constrained parser here https://github.com/ambiata/mafia/blob/master/main/mafia.hs#L190

jacobstanley commented 8 years ago

not sure if we understand InstallPackage as anything besides 'a string that cabal accepts'. might want to use a more constrained parser here https://github.com/ambiata/mafia/blob/master/main/mafia.hs#L190

Yeah this is awful, my bad :(