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

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

Open
damncabbage opened this issue May 12, 2016 · 2 comments
Open

Comments

@damncabbage
Copy link
Contributor

damncabbage commented May 12, 2016

The following commands all work to install purescript version 0.8.5.0:

  • env MAFIA_HAPPY=true MAFIA_ALEX=true support/purs/bin/mafia install purescript
  • env MAFIA_HAPPY=true MAFIA_ALEX=true support/purs/bin/mafia install 'purescript == 0.8.5.0'
  • env MAFIA_HAPPY=true MAFIA_ALEX=true support/purs/bin/mafia install purescript-0.8.5.0
  • env MAFIA_HAPPY=true MAFIA_ALEX=true support/purs/bin/mafia install 'purescript == 0.8.5.*'

Two things:

  • It appears that the purescript == ...-style version constraints are getting passed through to Cabal, intentionally or otherwise.
  • Running the above in that order locally on my machine caused a rebuild between purescript-0.8.5.0 and purescript == 0.8.5.* despite them both resolving to the same version and there being no newer release of purescript.

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
Copy link
Contributor

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
Copy link
Contributor

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 :(

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

3 participants