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

Make --try-hard the default behavior #23

Open
Franciman opened this issue Apr 3, 2019 · 0 comments
Open

Make --try-hard the default behavior #23

Franciman opened this issue Apr 3, 2019 · 0 comments

Comments

@Franciman
Copy link
Collaborator

Currently when we want vabal to suggest a ghc version to compile our cabal package, we can pass it two flags to alter its behavior: --try-hard and --try-super-hard.

The --try-hard flag makes vabal choose a ghc version that actually makes cabal v2-configure succeed, while currently the default behavior is to just read the version constraints on base and Cabal and choose a ghc version that fulfills them, therefore ignoring other dependencies ( see #19 ).
It runs cabal v2-build --dry for each ghc version compatible (actually not all, but one for each base version, i.e. it won't try both 8.6.4 and 8.6.3, but only 8.6.4) with the version constraints of base and Cabal.

Instead --try-super-hard runs cabal v2-build for each ghc compatible with base and Cabal version constraints, so it is only actually needed in very strange situations.

I think that --try-hard should be the default behavior because it is more beginner-friendly, since it suggests a ghc version taking into account all dependencies, thus guaranteeing that the package configuration be successful. On the other hand it has a more complex and is slower (potentially a lot slower, but it depends on how badly are the constraints defined, even if on pratical cases I have tested vabal on, it just had to try at most 2 ghc versions before giving a answer)

I would like to hear some feedback, though

/CC @zenhack @fgaz @jabberabbe @lortabac

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