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

please vendor dependencies #6

Closed
mischief opened this issue Sep 9, 2016 · 9 comments
Closed

please vendor dependencies #6

mischief opened this issue Sep 9, 2016 · 9 comments

Comments

@mischief
Copy link
Contributor

mischief commented Sep 9, 2016

please vendor the dependencies of algernon, so that it is less likely to break when dependencies change.

glide is a great tool for this.

if you don't wish to vendor dependencies directly in algernon (which i would recommend you do), please at least create package log files with e.g. glide, so that dependency versions are pinned.

@xyproto
Copy link
Owner

xyproto commented Sep 10, 2016

Good idea! Will do.

The Homebrew packages for Algernon has versions pinned already, but I think vendoring them with Glide is an even better idea.

@mischief
Copy link
Contributor Author

@xyproto i noticed recently you forked the sass package to avoid the git submodule, but i asked upstream to change it, and they did. so you don't need to use a fork any more :-)

@xyproto
Copy link
Owner

xyproto commented Sep 12, 2016

Thanks for the issue for the sass package, I updated the import so that it imports from wellington/sass again.

I also added a glide.yml file, but there seems to be issues when running glide install since it wants to fetch from github.com/gophertown/fsnotify, but I can't see where on earth it gets gophertown from, as it isn't mentioned in any of my sources, or in any sources in $GOPATH/src. Does the current glide.yml file work for you, or are there issues?

Would you recommend checking in a vendor directory?

@xyproto
Copy link
Owner

xyproto commented Sep 12, 2016

Do you also happen to know is srlt compares favorably to glide? I am new to both.

@mischief
Copy link
Contributor Author

@xyproto - not clear where github.com/gophertown/fsnotify would come from.

i have never heard of srlt - but i know glide is becoming popular with many projects.

there are pros and cons of vendoring the code itself. its for you to decide as a maintainer.

if you vendor the code, you have to update it sometimes, but it allows someone to build the code even if the upstream has changed api or even gone (like github.com/gophertown/fsnotify is gone).

if you don't vendor the code, the repo is smaller. but it's slightly more difficult for someone to build a particular version (especially anyone trying to package the app), and it is possible some upstream could go away and break the build. but at least if you pin the versions in glide (or similar tool) then you worry less about changing APIs.

@mischief
Copy link
Contributor Author

fwiw, i ended up writing this to package algernon in my gentoo overlay - https://github.com/offblast/overlay/blob/master/www-servers/algernon/algernon-1.0.ebuild

notice i did something similar to the homebrew file - download each pinned tarball of each dependency.

if algernon vendored dependencies in vendor/ directory, it might look more like https://github.com/offblast/overlay/blob/master/sys-cluster/hyperkube/hyperkube-1.4.0_beta_rc0.ebuild. simpler :-)

@xyproto
Copy link
Owner

xyproto commented Sep 14, 2016

Started using glide and vendored all the dependencies. Thanks for the tip!

Please test if it works correctly for you, if you have the chance.

@xyproto xyproto closed this as completed Sep 14, 2016
@mischief
Copy link
Contributor Author

@xyproto, it seems now pongo2 is a git submodule and not directly vendored. can it be directly vendored?

xyproto added a commit that referenced this issue Oct 12, 2016
* Got a "No submodule mapping found" error.
* Removed the git submodule from the index.
* Re-added the dependency with "glide up".
* Should fix issue #6
@xyproto
Copy link
Owner

xyproto commented Oct 12, 2016

Re-added the vendored dependency. Even though there were no .gitmodule file, it was left in the git index for some reason. Should be okay now.

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