-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix crash on Edit Code #2699
Fix crash on Edit Code #2699
Conversation
1fe536e
to
1b22bc1
Compare
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.
LGTM
The backport to
To backport this PR manually, you can either: Via the sg toolUse the sg backport -r jb-v7.4.x -p 2699 Via your terminalTo backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-jb-v7.4.x jb-v7.4.x
# Navigate to the new working tree
cd .worktrees/backport-jb-v7.4.x
# Create a new branch
git switch --create backport-2699-to-jb-v7.4.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c3211191996b35e745c9b0988d1f2a8018154479
# Push it to GitHub
git push --set-upstream origin backport-2699-to-jb-v7.4.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-jb-v7.4.x If you encouter conflict, first resolve the conflict and stage all files, then run the commands below: git cherry-pick --continue
# Push it to GitHub
git push --set-upstream origin backport-2699-to-jb-v7.4.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-jb-v7.4.x
Once the pull request has been created, please ensure the following:
|
Closes https://linear.app/sourcegraph/issue/QA-180/jetbrains-crash-occurred-while-clicking-on-edit-code-after-restarting.
Test plan
See the linear issue.
You can try removing
AccountData
entry fromworkspace.xml
before opening the project.Changes
First I tried to simply setActiveAccount for the deprecated manager. This is not the best solution as do not know some values for the account (
name
,displayName
,id
). We could hardcode some values but we would be persisting some artificial data for a simple task that is - all we need is to store the llm that was used for Edit Prompt most recently.So instead of hacking & mocking the deprecated logic (HistoryService is used basically only for history reasons, migrations, etc)... instead of that, let's simply use a simply dedicated storage class.
Also, it could be an actual storage with a corresponding storage file (.xml) but do we really need it? Project session persistence should the enough for most users.