-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Don't fetch submodules for plugins that aren't being built #5182
Conversation
Per JENKINS-43977 "Just in case this helps someone else. The url in .gitmodules is case sensitive for the plugin. Running git in a command line is not case sensitive. This caused me some confusion since the git submodule update --init –recursive command would work from a command line, but I would get the following exception from the plugin. Once I changed the case in .gitmodules to match the case in the git repo the plugin worked."
This reverts commit c7c4dd6. Lukas' name wasn't the problem. The clone depth is.
@JohannesLorenz found a bug with
So the hack for now is to force a depth that's so high, the commit's guaranteed to be there. 🤷♂ This latest version will fallback on a full clone when the commits missing. |
... sorry for so many pushes, the symptoms are unique to a fresh clone, so it requires a lot of trail and error. Edit: I think it's good now. |
First of all, many thanks for this PR and your efforts with fixing the submodule issue! Normally, I'd say many of those submodule related commits should go on top of master, since they are more urgent. But let's try to quickly review everything on this branch. |
I completely agree. I can separate the PRs if you wish. I was trying to fix testing while also drifting off course. :D |
A few comments from testing:
|
So you want a reverse lookup too? That's quite a bit more work -- and I'd argue, one without a valid use-case. Here's the original description:
This PR allows the git stuff to use them too, so it fulfills the requirement.
I strongly feel this is out of scope, lacks use-cases (the plugins remove the need for this now) and adds the potential for more bugs and delays to the PR, but I'll see if we can exit early in this scenario without causing regressions.
I didn't invent
No.
I feel this is misguided. I didn't invent
I believe |
But what's the use of
OK, in this case, a
Agreed, it can't be part of this PR.
CMake uses ON and OFF for booleans. So maybe |
- Document usage: submodues, plugins - List available values: submodules, plugins - Abort on bad values: submodules, plugins
Well, it uses truth(y) logic, so that's the same as "True", but that's moot. I haven't added this yet, still on the list tho.
Haha, well it is now... added via 5df372f. I guess if we're going to make
Try
Try Furthemore if something's provided and it's wrong, it aborts with a helpful message. Any and all feedback appreciated. |
Thanks for adding all that stuff 😃 Now, one issue I have is with
Any ideas? |
Would you find it practical to already show all submodules when one is wrong, instead of advising to type |
Whoops, looks like something is wrong? If you find it, feel free to patch it. Otherwise, I'll take a look ASAP.
Different CLI apps treat this differently and it sort of makes sense why. Let's say we keep this moving forward, we'd have to be consistent and do the same for the plugins. Well, the plugin list is so large, is spams the error right off the screen. For this reason, some CLI apps echo correct values, others do not. I'm fine either way as long as we're consistent. |
I tested and zyn's matching, so I think it's working as indicated. I had no intentions on using this as a reverse-lookup |
Added OPTION via OPTION(NO_SHALLOW_CLONE "Disable shallow cloning of submodules" OFF) |
What do you mean by "zyn's matching"? "zynaddsubfx" is no valid submodule (plugins/zynaddsubfx/zynaddsubfx is), so I'd expect it simply to abort. |
The code is: lmms/cmake/modules/CheckSubmodules.cmake Lines 83 to 84 in dcfc210
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a review. Some things to be done:
- Resolve the comments if they make sense
- More testing (I'll do this the next days)
- While it was easy to code-read this, I'm not sure about the merge strategy.
- We could easily squash all into one commit, which has both the bug fixes for lukas' name/full clone retry and the feature in only one commit. Would look unclean IMO.
- We could do a simple merge.
- You could squash/reorder the commits so they are only three (2 fixes, 1 feature) and I could rebase. Would that be OK?
I'm only addressing one (the ugly LIST reuse). If you feel strongly about the rest, feel free to push them to this branch.
I'm fine squashing and not concerned about the readability or separation really. The
I don't mind if you want to try. I'm not interested in doing it. The PR is representative of the work performed and we'll squash it out when it's ready for merge. |
- Quote variables when needed - Don't reuse a list for a separate purpose, it's confusing - Process LIST_SUBMODULES before processing errors
All comments addressed, ready for review and testing. :D |
I guess it would work if you'd remove duplicates from the submodule list. But before your fix it: What is the reason to expose |
Love your point. I'd be happy to remove it. You're the first human to ever ask about it TBH. |
OK, then let's hide it. It can be easily re-added later if there are complaints. Also, consider updating your copyright notice. This will reduce the amount for further tests significantly 😄 |
I wonder if we should call From a testing perspective, if you hide |
Documentation for |
Code/tests look good, I only found one issue:
Can you reproduce/fix it? |
Not on clone, but I didn't try to build.
Probably. I took a second look at the code and my help text wrong. It's not I'll fix the help text now. |
Indeed, I'll hit "squash and merge" as soon as you've pushed the help text fix (and the CI at least passed half-way). |
Downloads for this pull requestGenerated by the LMMS pull requests bot. |
One last thing, let's remove the I'm writing the commit message meanwhile... |
…hallow fallback (hotfix) * Retry updating submodules non-shallow if shallow clone fails (master hotfix) * Add `PLUGIN_LIST` support to CheckSubmodules (LMMS#5105) * Remove `SKIP_SUBMODULES` switch (it's redundant to specifying `PLUGIN_LIST`) * Add `NO_SHALLOW_CLONE` switch
Quoting the bug report:
Closes #5105