-
Notifications
You must be signed in to change notification settings - Fork 841
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
Is working with private versions of Hackage supported/possible? #445
Comments
I think you need to add Hackage as well. The semantics of this are to replace previous package indices, not augment them, since you can always add in additional ones locally. Can you try doing that and see how it works? |
Hey Micheal, I think I was misleading my omitting a crucial fact: Our private Hackage faithfully mirrors the main Hackage, so virtually ALL the packages which are there, are also in our Hackage. On top of those, we have our extra in-house pkgs. Said this, do you still want me to try adding the official Hackage as well? Just shout, it's really an easy thing to try on my side. |
Never mind, I missed the end of your comment. Since you're using the ghc-7.10 resolver, you need to add all extra packages to your extra-deps. You can fix this by:
|
Ah, that's what I suspected. Replying by points:
Are we out of other options here? What's the path of least resistance? Thanks! |
|
Ah, thanks for clarifying! I will have a play and I will get back to you, especially wrt 2) (I did try Alfredo |
Hey Michael, it's me again (I hope these real world experience reports from the trenches are useful!). After yesterday wrestling, this morning I had to split part of an in-house package into a small and specialised one, and I thought of giving I started with this innocent
This didn't work out of the box, and
After all of this, stack was able to execute What I've liked
What I've liked less
After this, I would get a disheartened and decide to either go into the All that say, please take this only as a genuine experience report from someone already using tools in his daily workflow, and trying TL;DR: Generally speaking, if I needed to convince my team to switch to
But where I can see Conversely, Another big plus is the cached builds, which I still have to investigate, but if I I think this ticket can be closed as the answer of that question is "Yes, it can be done, but it was a bit cumbersome for my (totally subjective) experience". I also want to point out that perhaps all of this might be out of the scope of Hope this piece of feedback will be useful to improve stack, and sorry if it was long-winded and confusing in more than one section! Alfredo |
My overall thought is: a lot of what you're trying to do is force cabal-centric workarounds into stack. stack really doesn't need to use a custom Hackage mirror to get extra packages, it has better ways of doing it (which aren't available in cabal-land). We never automatically grab packages from any package index, because that means the reproducibility of a build depends on what's in the upstream index, which leads to random build breakages, which is exactly what we're trying to avoid. Based on this feedback and similar questions, Tristan will be writing up some documentation (see #489). For the sake of your own sanity in builds, I'd recommend thinking again about reproducible builds, it's one of the prime pain points in cabal and something we've designed from the start to work in stack. |
Hey Michael, thanks for replying. Yes, I'm now a couple of days into Stack and I can see where you are coming from. In my "defence" I think the cabal-centric approach stems as the result of trying to apply the past of least resistance when migrating and incorporate stack into the everyday workflow. I can imagine there are others like me falling into the same pitfalls. Looking forward to reading such documentation! |
Cool, glad to hear it! And the feedback here was helpful. Even if I'm stubbornly stick to my guns on stack being right here[1], it helps us to know what needs more clarification. [1] Well, I hope I'm not really that stubborn |
Glad it was useful, I wrote that with that ultimate purpose in mind! I really like where stack is going, I was just playing the devil's advocate, trying to anticipate any possible doubt/skepticism from the rest of my team 😉 |
Hello all,
sorry if there is already a duplicated issue somewhere, weren't able to find it.
I am trying to port an existing project I have at work to use
stack
. The requisite is that I want to make this as less intrusive as possible, to try to convince later on the rest of the team to switch, provedstack
is the correct tool for us. In doing so, I need stack to full interoperate with our private version of Hackage, which is hosted in a VPS and it's where we upload all our in-house, proprietary packages.I have dutifully followed the FAQ, which suggest to add the
package-indices
section to mystack.yml
, which now looks like this:My expectation would be for
stack
to honour this and then bring "in scope" our in-house packages. But when I try to runstack build --flag chronos:development
(incidentally is this the equivalent of calling cabal build -fdevelopment ?) I get (Sorry for the deluge of output!):I have also tried to run
stack init --solver
, but without much luck either:Here
hermes
is our proprietary package, available only on our private Hackage.Any idea?
Thanks!
Alfredo
The text was updated successfully, but these errors were encountered: