Live data from Hacker News

Mastering Git submodules

medium.com

31–33 of 33 posts

Re: Mastering Git submodules

#31
post #29
post #2

I use them daily and they're painful! Thankfully, there's Peru [0]. Unfortunately, it only works on Python 3.3+. [0] https://github.com/buildinspace/peru

What's unfortunate there? It's not like Python is hard to install.

For stuff you use daily - not an issue, but having to install Python 3.3+, and then Peru, and then being able to do something with a third-party project would be a bit too much for some.

Re: Mastering Git submodules

#32
post #19

Earlier quoted context omitted.

The drawback is that things like feature branches are more difficult to use. For example, with npm you need to resort to various scripts or handle them by yourself manually.

You're right, but in general I don't think any npm module ought to depend on a feature branch of another npm module. If a feature is worth keeping around, it's worth publishing (even if only to your private npm repo). If 19 different projects want 19 different behaviors from the module.foobar() function, then split the function up or pass it flag parameters or whatever, but don't keep 19 different versions of the cod…

>Of course while you're developing a new feature you might want to use it from another module on your dev machine, but "npm link" is what you want to use for that.

Yeah, but that's the manual way. It works okay when you're only developing a small number of modules (say 1 to maybe 3), but at some point doing it manually becomes pretty annoying. And you need scripts and commits to package.json files if you have a build server which makes builds of feature branches.

Post reply on HN