Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Submodule init is easy to miss when hacking on Brackets #2244

Closed
peterflynn opened this issue Nov 29, 2012 · 10 comments
Closed

Submodule init is easy to miss when hacking on Brackets #2244

peterflynn opened this issue Nov 29, 2012 · 10 comments

Comments

@peterflynn
Copy link
Member

Forgetting to run git submodule update --init seems like the most common pitfall people hit when following the How to Hack on Brackets guide. Is there anything we could do to reduce the likelihood of that?

  • It's already called out in "Getting a Copy of the Code," but people might skip that section if they feel like they already know how to clone repos. Should we add a note elsewhere in the wiki page?
  • We could try to detect missing submodules during Brackets startup and show a warning (perhaps similar to how we detect in-browser). But that would be fragile code that'd be hard to maintain.
  • We could have the "setup_for_hacking" script check for missing submodules and issue an error/warning. That seems simple and fairly easy to maintain.
@peterflynn
Copy link
Member Author

If anyone knows both shell scripts and .bat scripting, the third idea should be pretty easy to implement :-)

@njx
Copy link
Contributor

njx commented Nov 29, 2012

That would be useful, though it only addresses initial setup--it's also easy to forget to update submodules later on.

It might be easy to put a check in Brackets that checks if you're running out of a git repo, checks the desired SHAs for the submodules, and then checks that the HEAD of each submodule matches the SHA. I don't know where the expected SHA is stored in the main repo, but once we figure that out it would be pretty easy to check.

@njx
Copy link
Contributor

njx commented Nov 29, 2012

Actually, it looks like it's not easy to determine the expected SHA without actually using git commands--it's stored directly in the object database.

@tomekr
Copy link

tomekr commented Nov 29, 2012

I just started with environment initialization and this happened to me. I believe the problem is when you're going through the How to Hack on Brackets page, you reach the part where it says, "See Running Your Copy of the Code for more details." under the "How Brackets is Organized" section.

At this point I'm thinking, "Hell yeah I want to eat my own dog food!" I click on the link which sends me to the "Running Your Copy of the Code" section, skipping over the "Getting a Copy of the Code" section which has the initialization snippet.

I think this can be mitigated by adding a section in the Running Your Copy of the Code, instructing the user to ensure they've completed the "Getting a Copy of the Code" section.

@pthiess
Copy link
Contributor

pthiess commented Nov 30, 2012

Reviewed

@peterflynn
Copy link
Member Author

Nominating for Sprint 19 since we continue to get frequent reports of this, and it seems hard for people to figure out on their own (especially since it's not obvious how to open the dev tools when the UI is blank).

@jdiehl
Copy link
Contributor

jdiehl commented Dec 23, 2012

I saw this issue a bit late so my fix #2440 for it (implementing the second option) might not be relevant. However, it seems simple enough to maintain and can serve as a temporary solution or to double-check the third way of checking this.

@ghost ghost assigned peterflynn and jdiehl Jan 14, 2013
@njx
Copy link
Contributor

njx commented Jan 14, 2013

FBNC to @peterflynn -- it looks like we merged @jdiehl's solution.

@ghost ghost assigned peterflynn Jan 18, 2013
@njx
Copy link
Contributor

njx commented Jan 18, 2013

Oops, I forgot to actually assign this back to Peter.

@peterflynn
Copy link
Member Author

Verified fixed. I also took @tomekr's advice and tweaked the wiki instructions to make submodule update harder to gloss over.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants