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

Submodules #2402

Closed
wants to merge 1 commit into from
Closed

Submodules #2402

wants to merge 1 commit into from

Conversation

naspeh
Copy link
Contributor

@naspeh naspeh commented Nov 8, 2016

Let's use git submodules for cores, benefits:

  • github shows them (in this PR or inside code tree https://github.com/naspeh-sf/superdesk/tree/submodules)
  • updating cores: go to client-core or server-core and git pull then commit new version of submodules in the main repo
  • all sourcefabric code in specific place (not in node_modules or inside virtualenv)

As developer:
I can just clone core repos to these directories and develop inside without using git submodule update --init. Anyway, I still need to use npm link for client-core.

As devops:
I can use the same tree to test cores, just clone the main repo and then fetch specific commit for cores into these directories.

P.S. Git Submodules basic explanation

@hlmnrmr
Copy link
Contributor

hlmnrmr commented Nov 10, 2016

Not sure about this. I understand the idea behind, but with submodules you really need to know what you are doing, otherwise you may get into trouble. Let's see what others say about this @superdesk/superdesk-core @superdesk/superdesk-editorial @superdesk/superdesk-data

@naspeh
Copy link
Contributor Author

naspeh commented Nov 10, 2016

@hlmnrmr please share the source of

you really need to know what you are doing, otherwise you may get into trouble

We point exact commit in our references, you can do it with submodules - they are here for that...

@petrjasek
Copy link
Member

I don't see this very useful for my workflow, not sure about others (especially devops).
also not sure how I would profit from those listed benefits:

updating cores: go to client-core or server-core and git pull then commit new version of submodules in the main repo

we have a script for that

all sourcefabric code in specific place (not in node_modules or inside virtualenv)

can you explain why this is good?

having said that, I'm not against this. can we use tags for submodules, or just commit ids?

@hlmnrmr
Copy link
Contributor

hlmnrmr commented Nov 10, 2016

@petrjasek afaik, you can also use tags

@naspeh
Copy link
Contributor Author

naspeh commented Nov 10, 2016

Updated README a little:

@petrjasek: you can use it with branches too, for example 1.0 releases

cd client-core
git checkout 1.4
cd server-core
git checkout 1.4
# and then "git pull origin HEAD" for updates

can you explain why this is good?

I'm going to update installation docs with "Unify deployment" stuff.

For example if I'm going to contribute to superdesk-core I'll still use this main repo with the same installation, then I change the code in server-core directory and virtualenv will see the changes...

The same for client-core to use one installation instruction.

@gbbr
Copy link
Contributor

gbbr commented Nov 11, 2016

In my experience people generally avoid using git submodules. Their implementation is faulty and they can cause a lot of problems in your workflow. I don't have solid evidence to back this up, but I can tell you for sure that it is something generally avoided. Not much to add other than this.

@naspeh
Copy link
Contributor Author

naspeh commented Nov 11, 2016

Seems I need to find another solution without submodules. Thanks, guys. I'm closing this PR.

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

Successfully merging this pull request may close these issues.

4 participants