-
Notifications
You must be signed in to change notification settings - Fork 5.9k
refactor (vscode): migrate from submodule to subtree #2476
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
Conversation
git-subtree-dir: lib/vscode git-subtree-split: e5a624b
Okay made some initial progress. The migration piece was the easy part. The harder part is understanding how to update our How do we keep our subtree up to date with vscode? Thinking a bit out loud here...
If it were a normal repository, like a fork I'd probably fetch the latest changes then rebase my changes on top of those. But subtree's don't support rebase, only merge strategies. So we have to figure that out. Resources that may help: |
Maybe something like this? # Add vscode as a new remote
# TODO only do once
git remote add -f vscode https://github.com/microsoft/vscode.git
# Prep to merge with version we're currently on
git merge -s ours --no-commit --allow-unrelated-histories vscode/release/1.51
# Read changes to our sub directory
git read-tree --prefix=lib/vscode -u vscode/release/1.51
# Commit changes
# git commit -m "chore: update vscode" |
I think all we need to do in That way development would just be:
As for updating VS Code once the remote is added I think all we need is something like:
I'm not sure we need a script for that, maybe we just add it to the contributing docs. |
Great idea! Didn't think of that.
Ah, if it's only one line, I agree, we probably don't need that. I'll add to contributing. Thanks @code-asher |
Alright a few errors I'm seeing. Error in fmt scriptIn our
The code there reads: #!/bin/bash
function get_total_cpu_time() {
# Read the first line of /proc/stat and remove the cpu prefix
CPU=(`sed -n 's/^cpu\s//p' /proc/stat`)
# Sum all of the values in CPU to get total time
for VALUE in "${CPU[@]}"; do
let $1=$1+$VALUE
done
} (see file on remote) Error in lint scriptIt seems like it can't find our
Error on linux-arm64It's out of space.
|
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.
Very exciting! A couple other areas we should update:
tour/contributing.tour
: Change"file": "ci/dev/vscode.patch"
to"directory": "lib/vscode"
and update the wording to not reference the patch.- There are some references to applying the patch in
ci/README.md
which we should remove.
I haven't looked at the lint/fmt errors or the space issue yet.
Re: Feedback in Slack from @code-asher
|
For the space issue it seems to run out when copying to the GCP directory ( |
Good call. I removed it in 96576bd
Do you want me to open an issue for us to do that in the future? |
That's interesting...It's still trying to add it. I must have removed the wrong step. |
No need, we're tracking it internally.
Nah you got it right, it's just running out of space later down the line now. |
4203bfc
to
74d6d5e
Compare
May submodules burn in hell! |
This PR changes our current approach of using
vscode
as a submodule to using it as a subtree.Changes
ci/dev/vscode.patch
ci/dev/patch-vscode.sh
andvscode:patch
frompackage.json
ci/dev/diff-vscode.sh
andvscode:diff
frompackage.json
vscode.sh
and addpostinstall
script topackage.json
Remaining Todos
ci/dev
scriptsci/build
scripts| grep -v "lib/vscode"
to all thegit ls-files
invocationsScreenshots
Checklist
Fixes #1587
Many thanks to @SPGoding for testing out this approach and outlining the steps to start this effort! 🎉