-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Change the order of haxelib git
submodule installation
#638
Change the order of haxelib git
submodule installation
#638
Conversation
Is For reference, that is what github's actions/checkout does: // Checkout submodules
core.startGroup('Fetching submodules')
await git.submoduleSync(settings.nestedSubmodules)
await git.submoduleUpdate(settings.fetchDepth, settings.nestedSubmodules)
await git.submoduleForeach(
'git config --local gc.auto 0',
settings.nestedSubmodules
)
core.endGroup() Which does support the idea of sync/update instead of |
seems like from that actions/checkout repo, its the
I think the order doesn't matter too much, the way I did it was a bit of an artifact of my R&D, but I'll update it to actually match the order of actions/checkout (sync, and then update + init) |
I just pushed a commit that also resolves #635 , where we read bytes from |
I suppose part of the specific hanging issue (on my mac that is) is it seems to want to spit the process stderr out somewhere when checking out submodules from In anycase, I can and will split up the code into separate PRs! |
Separate changes should now be in PR #641 ! |
…ion#638) * submodule stuff in progress * perhaps a submodule fix? * revert the dipshit logging * update run.n * we dont need to spit out every log, but we should use the threads? * comment out the unneeded git fetch * small reorder / remove redundant `git submodule init` * uncomment the lib deletion, since we've ran into issues related * fix for stderr/stdout related hangs on non-windows when installing git submodules * remove git progress code * run.n * remove whitespace * proper non-cli coupled logging * remove unneeded logging/git --quiet flag code for the time being * run.n * remove unneeded FsUtils.deleteRec() * run.n * remove testing print * run.n * removed unused import and throw an exception on submodule error * add message for SubmoduleError
Putting this here as a bit of a draft / feedback.
Currently the
haxelib git
command doesgit clone --recursive
which will install submodules alongside the clone. However you can run into a specific issue (openfl/lime#1798) related to potentially broken commits in the git history.You can get around this specific issue by having
transfer.fsckObjects = false
in your git config, but based on my own testing it doesn't actually seem to apply this when doing theclone
command, only once the repository is already initialized and when you're runninggit submodule update
will it use the git config to ignore broken commits.This PR moves the submodule installation to only run after the git clone finished successfully, and after checking out the specified branch/version.
It will run
git submodule init
git submodule sync --recursive
git submodule update --recursive
I may or may not have ran into issues when running it less verbosely (
git submodule update --init --recursive
initializes the submodules in the same command asupdate
) but I believe ran into some issues there.