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

Handle case-insensitive flag names WAS Cannot resolve HDBC with time 1.4, even with flags #397

Closed
hesselink opened this issue Jun 24, 2015 · 4 comments

Comments

@hesselink
Copy link
Contributor

@hesselink hesselink commented Jun 24, 2015

This is similar to #396, but I can't get it to work even with flags. I can again reproduce with stack new, the following stack.yaml:

flags: {}
packages:
- '.'
extra-deps:
- HDBC-2.4.0.1
- time-1.4.2
- convertible-1.1.1.0
- utf8-string-1
flags:
  HDBC:
    minTime15: false
resolver: ghc-7.8

And adding HDBC to the build-depends of the cabal file. Issuing stack build now gives:

While constructing the BuildPlan the following exceptions were encountered:

--  Failure when adding dependencies:
      time: needed (>=1.5 && <1.6), but 1.4.2 found
    needed for package: HDBC-2.4.0.1

--  Failure when adding dependencies:
      HDBC: needed (-any), but couldn't resolve its dependencies
    needed for package: new-template-0.1.0.0

Even though, according to the cabal file in HDBC, with minTime15 on false it should depend on time < 1.5.

@hesselink
Copy link
Contributor Author

@hesselink hesselink commented Jun 24, 2015

I've figured it out: it needs to be mintime15 (without a capital t). Cabal accepts both, and the cabal file lists it with a capital t, so this is pretty confusing. Should I leave this open?

@snoyberg
Copy link
Contributor

@snoyberg snoyberg commented Jun 24, 2015

Flag names are case-insensitive? That's... surprising. Yeah, let's leave this open, I'll update the title.

@snoyberg snoyberg changed the title Cannot resolve HDBC with time 1.4, even with flags Handle case-insensitive flag names WAS Cannot resolve HDBC with time 1.4, even with flags Jun 24, 2015
@snoyberg snoyberg added this to the 0.2.0.0 milestone Jun 24, 2015
snoyberg added a commit that referenced this issue Jun 25, 2015
Pinging @chrisdone. This isn't terribly efficient, since it requires
converting to lower case for each comparison. Better would be using the
same approach as the case-insensitive library. You think it's worth
doing that here?
@snoyberg
Copy link
Contributor

@snoyberg snoyberg commented Jun 25, 2015

@hesselink This should now be resolved on master. Could you test it out to confirm?

@hesselink
Copy link
Contributor Author

@hesselink hesselink commented Jun 25, 2015

Yes, I tried both capitalizations, and they both work. Thanks!

@hesselink hesselink closed this Jun 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants