Giter Club home page Giter Club logo

Comments (4)

robfig avatar robfig commented on August 14, 2024

Forks for me always divide into two situations:

  • Long-lived forks, where I may open pull requests to the upstream repo, but they won't merge or are slow to merge pull requests.
  • Short-lived forks, which exist just to send a particular pull request.

For long-lived forks, I think that changing the GLOCKFILE and rewriting your imports to use it is appropriate.

For short-lived forks, I add my fork as a remote to the primary repo location (so that I don't have to rewrite imports to have my code use the change locally), and when the main repo merges the change, then I update the GLOCKFILE so that others on the team get the change.

This article describes that flow pretty well
http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html

Does that address your use case?

Thanks for using Glock!

from glock.

birkirb avatar birkirb commented on August 14, 2024

This makes sense, and I've pretty much been using the short-lived forks approach for most things. However I don't always know from the outset if I'll have a long or short lived forks, and inevitably I'll have to share the build dependencies with other team members before this.

Even for medium/long-lived forks, rewriting imports can be a challenge. I have a patch for revel that brings a-feature-I-really-need-right-now-but-isnt-on-the-roadmap-until-next-release-or-the-release-after-that, and for a library like revel changing all the import statements is a non-trivial task (and affects many of the tools used), especially since I really would like to get up to date once said feature is out.

I've only seen a few of dependency managers (https://github.com/mattn/gom, https://github.com/vube/depman, https://github.com/nitrous-io/goop) that support some kind of workaround for these situations, but they have other deficiencies that kept me from going with them.

from glock.

robfig avatar robfig commented on August 14, 2024

It seems like it would be complicated for Glock to support that use case. (The ability to specify a destination directory different from the natural location)

It sounds like a large part of the difficulty you have is the rewriting-imports step. Maybe addressing that would be the easiest thing? I believe that there are dedicated programs for that, but doesn't a simple find-replace of the full import paths

from glock.

birkirb avatar birkirb commented on August 14, 2024

For something like revel, it's not just import paths, but template paths, modules etc...
I have a work around for now, but will seek some permanent solution. It could be something as simple as manually specifying the clone command... but granted, perhaps not your itch at the moment.

from glock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.