Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fix submodule update when jquery is itself a submodule #921

Closed
wants to merge 1 commit into from

5 participants

@godmar

When jquery is itself a submodule in a git repository, .git
will be a file, not a directory. jquery must still update the
submodules on which it depends in that case.

@godmar godmar Update submodules when .git exists as file or dir
When jquery is itself a submodule in a git repository, .git
will be a file, not a directory.  jquery must still update the
submodules on which it depends in that case.
0af90fa
@gnarf
Owner

We no longer use the Makefile

@rwaldron
Collaborator

@gnarf37 Unfortunately, we do. make gets called from grunt.js—its sole purpose is the submodules. The reason this was left behind is because I couldn't find a reasonably complete async git package for node. It's a standing TODO item, that anyone is welcome to grab.

@scottgonzalez

Why don't you just shell out to git? We're doing that a lot for UI.

@rwaldron
Collaborator

Why don't you just shell out to git? We're doing that a lot for UI.

I think I was trying to avoid rolling my own if possible. I'd much prefer to use a comprehensive package that is fully tested, but none was a available at the time. Also, when I wrote that, I looked to see what you guys were doing and you hadn't crossed that bridge yet.

@godmar

The reason I filed this bug was because I'm using a fork of jQuery as a submodule in my project, and was running make to update jquery's submodule dependencies, which failed because of that bug.

If you don't want to fix that, please advise how to ensure that jQuery's submodule dependencies are updated when jQuery is itself a submodule of another project. Thanks.

@rwaldron
Collaborator

@godmar That much is clear, the problem is that we're trying to shed the makefile and whether you'd filed this PR or not, it would've gone away. When you submodule, are you ensuring that a specific tag (release) is used?

@godmar

I don't believe so.

Right now, I do: "make update_submodules jquery min" from the emcompassing project. That needs to pull in sizzle and qunit.

The update_submodules target simply runs git submodule update --init. I'm happy to run this myself, side-stepping the bug I filed here.

For the other make targets (jquery min) I'd need to follow the new build instructions sans Makefile. Note that I'm actually using an older jQuery, so haven't read the instructions for the current one - I just noticed that the -d test is still in the latest version, so I thought pointing out this problem might benefit others.

@rwaldron
Collaborator

@godmar gotcha, at this point neither the jquery or min tasks even exist anymore. (https://github.com/jquery/jquery/blob/master/Makefile).

w/r to building the master (which is where development is done): I'd caution against that as we frequently change large pieces of code in jQuery, making it fairly unstable. Releases are tagged when stable

@dmethvin
Owner

It definitely seems like a bad idea to build a fresh jQuery out of master if you want any kind of stability for your own project. Even for our own submodules we don't pull the latest in all cases because we want to ensure there is no breakage. We just updated to QUnit 1.10 for example and had to fix a couple of unit test issues caused by some of its new features.

I think our goal is to get all the update-related stuff into the gruntfile so I'll close this PR. I've created a ticket for tracking that as a todo: http://bugs.jquery.com/ticket/12490

@dmethvin dmethvin closed this
@godmar

It definitely seems like a bad idea to build a fresh jQuery out of master if you want any kind of stability for your own project.

The reason I reported this bug against master is because I always check if a bug has been fixed in the current development version before reporting it, not because I wish to use the current development version. Often, when reporting a bug, the answer of the development team is: Have you checked the current git? Your answer is the opposite: We know the current master is broken, but it'll be fixed in the next release, so you should wait for it.

@dmethvin
Owner

@godmar, we simplify that by offering http://code.jquery.com/jquery-git.js if you want to use it. The main reason I closed this PR was because we want to solve the problem you've identified in a different way.

@godmar

Sure, no problem. It's not critical for me at this point, I'm glad I could be of help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 5, 2012
  1. @godmar

    Update submodules when .git exists as file or dir

    godmar authored
    When jquery is itself a submodule in a git repository, .git
    will be a file, not a directory.  jquery must still update the
    submodules on which it depends in that case.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  Makefile
View
2  Makefile
@@ -9,7 +9,7 @@ submoduleclean: clean
# --merge doesn't work when doing an initial clone, thus test if we have non-existing
# submodules, then do an real update
update_submodules:
- @@if [ -d .git ]; then \
+ @@if [ -e .git ]; then \
if git submodule status | grep -q -E '^-'; then \
git submodule update --init --recursive; \
else \
Something went wrong with that request. Please try again.