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

Github dependency updates on branch change #309

Closed
jhw opened this issue Jul 16, 2015 · 7 comments
Closed

Github dependency updates on branch change #309

jhw opened this issue Jul 16, 2015 · 7 comments

Comments

@jhw
Copy link

jhw commented Jul 16, 2015

If I have a Makefile with a Github dependency and I change the branch from (eg) 'master' to 'dev', should the deps code be automatically updated on 'make' ? Or is there another command to do this ? I find right now I have to run 'sudo rm -r deps/my_dep' prior to 'make' which I'm guessing isn't the One True Way :-(

TIA

@jhw
Copy link
Author

jhw commented Jul 16, 2015

I should add, I don't want to clean all deps using 'make clean/deps' or whatever; I have amqp_client as an additional dep which takes an age to build; so I just want to clean this single dep (above). Ideally erlang.mk would detect the branch I want has changed (surely the name of the current branch is stored in deps somewhere, for it to compare ?)

@essen
Copy link
Member

essen commented Jul 16, 2015

It shouldn't do it automatically at least, because it is very convenient to use symbolic links when working with your own projects as dependencies (for example cowboy with cowlib and ranch as symlinks, to work on all 3 at once; commits in the symlink don't necessarily match commits specified in the Makefile).

A command to update deps would be good, though. What this command should look like is a good question however. Perhaps a "make update" along with a "make update dep=cowlib" so you can update all or one. The latter would allow working with symlinks still.

But yeah, need thought, experimentation, and so on. :-)

@jhw
Copy link
Author

jhw commented Jul 16, 2015

"make update dep=cowlib" would be near- perfect IMHO
On 16 Jul 2015 13:39, "Loïc Hoguin" [email protected] wrote:

It shouldn't do it automatically at least, because it is very convenient
to use symbolic links when working with your own projects as dependencies
(for example cowboy with cowlib and ranch as symlinks, to work on all 3 at
once; commits in the symlink don't necessarily match commits specified in
the Makefile).

A command to update deps would be good, though. What this command should
look like is a good question however. Perhaps a "make update" along with a
"make update dep=cowlib" so you can update all or one. The latter would
allow working with symlinks still.

But yeah, need thought, experimentation, and so on. :-)


Reply to this email directly or view it on GitHub
#309 (comment)
.

@essen essen added the Bug label Aug 14, 2015
@essen
Copy link
Member

essen commented Aug 14, 2015

I know this is a feature request, but it's painful enough to be considered as a bug. That and I'll fix it quicker.

@essen
Copy link
Member

essen commented Sep 5, 2015

Here's my thoughts on this subject:

  • make update: lists all deps, their fetch method/url/version, whether the local copy is dirty (uncommitted changes), whether the local copy is not synchronized with version in Makefile and finally whether a new version is available upstream
  • make update dep=cowlib: the info above for cowlib + the list of tags/commits available upstream since the current version; if tags: try to only show tags more recent; if following a branch then compare commits; if commits then by default count the number of commits and give hash of most recent, optionally display a shortlog of more recent commits and optionally print a diff of everything that has changed upstream
  • make update dep=cowlib to=VERSION: update cowlib to VERSION, update the locks file (Add a lock feature #241) if we choose to go that way, otherwise update the Makefile's dep_cowlib line perhaps

@essen
Copy link
Member

essen commented Mar 8, 2016

WELL ACTUALLY

Since we are able to detect when a Makefile has changed (and trigger full recompilation) we can detect when deps have been changed and automatically update them. There's no need for a command or anything! (Well maybe if we want to follow a branch instead of a specific commit.)

This doesn't account for the fact you can specify deps from the command line, but I don't think too many people do that (and if they do, I'm not sure they would want to do it to trigger a dependency update anyway).

But otherwise, when the Makefile changes, it doesn't hurt to check and update dependencies.

@essen
Copy link
Member

essen commented Nov 25, 2024

Closing in favor of #241 which is related.

@essen essen closed this as completed Nov 25, 2024
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

2 participants