Skip to content
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

Fallback Diff segmenting move in large C file. #78

Open
bbbecker opened this issue Nov 15, 2024 · 2 comments
Open

Fallback Diff segmenting move in large C file. #78

bbbecker opened this issue Nov 15, 2024 · 2 comments
Labels
bug Something isn't working vscode The issue is related to our VS Code extension

Comments

@bbbecker
Copy link

Describe the Bug
I am using the VS Code extension to look at a C File. The move detection seems to be working, however it is segmented into almost every single line which pollutes the view. The files I am looking at are almost 4000 lines, and this seems to work correctly when I copy a small snippet of about 50 lines out

To Reproduce
Steps to reproduce the behavior:

  1. Start with (c) file that has 4000 lines
  2. Move large chunks of the lines (500-1000) and save as new file
  3. Open a diff for both files
  4. See error

Expected Behavior
Expect the moves to be in contiguous blocks
image
image

Actual Behavior
each line is an individual move

Screenshots
image
image

Source Code
Sorry, I can't share any more code.

SemanticDiff Version
v0.9.0

VS Code Information
Version: 1.95.3 (user setup)
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

Additional Context
Add any other context about the problem here.

@bbbecker bbbecker added bug Something isn't working vscode The issue is related to our VS Code extension labels Nov 15, 2024
@bbbecker
Copy link
Author

Actually, here are 2 files with some copilot-generated code that shows the same behavior.
copilot_test.zip
image
image

@slackner
Copy link
Contributor

Hello @bbbecker,

Thanks for reporting this issue!

The main reason for the poor quality of move detection is that C/C++ support is still missing, so there is basically no "structure" to consider when matching lines. For supported languages, the quality of the matches should be much better.

I'm currently working on improvements for move detection and will look into this as well.

Best Regards,
Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vscode The issue is related to our VS Code extension
Projects
None yet
Development

No branches or pull requests

2 participants