On 8 January 2017 at 22:03, Damian Nadales <[email protected]> wrote:
> On Fri, Jan 6, 2017 at 11:59 AM, Erik Hesselink <[email protected]> > wrote: > > Another option that falls in between a monorepo and a git dependency is > > using git submodules. We did this for forks and open sourced libraries. > You > > still need to point to a commit hash (since that's how submodules work) > but > > as mentioned that's a good idea anyway. We then listed those submodule > > packages as 'extra-dep: true' to not have them treated as part of our own > > sources. > > > That also looks like a simple solution. How does this approach works > for you in practice? I've heard people advising against the use of > git-submodules (we don't use them currently). > We've used it ever since we switched to stack about 1.5 years ago, and we've used submodules for about 7 years, so I'd say it works. Submodules are not great (biggest problem is that a pull doesn't update them, so you can accidentally commit a revert of the updated submodule) but they work. If you have things you often want to branch together, I'd put them in the same repo (we do for our normal libraries and apps) but loosely related things like forks of dependencies work well as submodules. Erik > > > The stack.yaml would look something like this: > > > > packages: > > - local-package-1/ > > - local-package-2/ > > - location: forks/submodule-for-fork/ > > extra-dep: true > > > > Erik > > > > Erik > > > > > > On 6 January 2017 at 09:11, Christopher Allen <[email protected]> wrote: > >> > >> That's absolutely what we want and is representative of the point of > >> Stack: deterministic, reproducible builds. > >> > >> Anything that should have changes tracked collectively (if B uses A, > >> and B should always use the latest version of A), then it implies it > >> should be part of a monorepo. Which is what we do for those > >> components. > >> > >> Here's a snippet from our stack.yaml: > >> > >> resolver: lts-6.8 > >> packages: > >> - hestia/ > >> - thoth/ > >> - friendlyId/ > >> - rosetta/ > >> - location: > >> git: https://github.com/mwotton/mandrill > >> commit: fd22b874feb76fbb76911b6049b4a89f181857d8 > >> extra-dep: true > >> > >> Here mandrill is a fork of a repo. We don't want to this to change > >> unless we explicitly upgrade. > >> > >> hestia, thoth, friendlyId, and rosetta are all part of the same repo > >> because they "belong together." > >> > >> Does that help? > >> > >> On Fri, Jan 6, 2017 at 1:55 AM, Damian Nadales < > [email protected]> > >> wrote: > >> > > >> > > >> > On Jan 6, 2017 08:40, "Christopher Allen" <[email protected]> wrote: > >> > > >> > I use Stack with private git repos. If your git configuration is > >> > correct (I never do anything manual, it's just ssh keypairs) then it > >> > should work out of the box. > >> > > >> > It does. I did a small experiment and it works perfectly. The only > thing > >> > I > >> > don't like is that I need to specify the commit in my stack.yml: > >> > > >> > > >> > http://stackoverflow.com/questions/41370813/using-a- > private-git-repository-with-stack > >> > > >> > This means that updating the package requires updating the commit id > at > >> > the > >> > stack file. > >> > > >> > I don't know if you refer to this approach. > >> > > >> > > >> > On Wed, Dec 28, 2016 at 4:50 PM, Damian Nadales > >> > <[email protected]> wrote: > >> >> Hi, > >> >> > >> >> I guess is a situation encountered quite often in practice. However > >> >> I'm not sure what is the right way of using a private repository in > >> >> stack as the source of Haskell packages. This is how far I've come: > >> >> > >> >> > >> >> http://stackoverflow.com/questions/41370813/using-a- > private-git-repository-with-stack > >> >> > >> >> Which approach do you use? > >> >> > >> >> Thanks in advance! > >> >> Damian. > >> >> > >> >> -- > >> >> You received this message because you are subscribed to the Google > >> >> Groups > >> >> "Commercial Haskell" group. > >> >> To unsubscribe from this group and stop receiving emails from it, > send > >> >> an > >> >> email to [email protected]. > >> >> To post to this group, send email to > >> >> [email protected]. > >> >> To view this discussion on the web visit > >> >> > >> >> https://groups.google.com/d/msgid/commercialhaskell/ > CAM7nXedTsWdQX0U8onuO%2BqMEkc2OBOzw%2BZ5Mo_S_ek2-HuvtJg%40mail.gmail.com. > >> >> For more options, visit https://groups.google.com/d/optout. > >> > > >> > > >> > > >> > -- > >> > Chris Allen > >> > Currently working on http://haskellbook.com > >> > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups > >> > "Commercial Haskell" group. > >> > To unsubscribe from this group and stop receiving emails from it, send > >> > an > >> > email to [email protected]. > >> > To post to this group, send email to commercialhaskell@ > googlegroups.com. > >> > To view this discussion on the web visit > >> > > >> > https://groups.google.com/d/msgid/commercialhaskell/ > CADnndOq_jgdDo8vh3O1_kj%2BU_j68ZxfgJfVOSsVYbmWNvFEboQ%40mail.gmail.com. > >> > For more options, visit https://groups.google.com/d/optout. > >> > > >> > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups > >> > "Commercial Haskell" group. > >> > To unsubscribe from this group and stop receiving emails from it, send > >> > an > >> > email to [email protected]. > >> > To post to this group, send email to commercialhaskell@ > googlegroups.com. > >> > To view this discussion on the web visit > >> > > >> > https://groups.google.com/d/msgid/commercialhaskell/ > CAM7nXecHkFpHhWpD2157%3Df_Hju4RtZBEE9pjoNgL9dZx88C1wQ%40mail.gmail.com. > >> > > >> > For more options, visit https://groups.google.com/d/optout. > >> > >> > >> > >> -- > >> Chris Allen > >> Currently working on http://haskellbook.com > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Commercial Haskell" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to [email protected]. > >> To post to this group, send email to [email protected] > . > >> To view this discussion on the web visit > >> https://groups.google.com/d/msgid/commercialhaskell/ > CADnndOrF7LakVAXKcNvXxc63subMt3G2qVGjDAutqg75dD_Bbg%40mail.gmail.com. > >> For more options, visit https://groups.google.com/d/optout. > > > > > -- You received this message because you are subscribed to the Google Groups "Commercial Haskell" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/commercialhaskell/CAPeieQFBt%3DkPTtH%3DPjF66qVQEp4h7dJcZxbpyWNbK4yqzOu%3Dfg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
