Sysmagine / SemanticDiff

Community support for SemanticDiff, the programming language aware diff for Visual Studio Code and GitHub.
https://semanticdiff.com
40 stars 0 forks source link

Can't compare files that haven't been saved yet #4

Closed mmueller2012 closed 1 year ago

mmueller2012 commented 1 year ago

Describe the Bug It is not possible to compare files if at least one of them hasn't been saved yet.

To Reproduce Steps to reproduce the behavior:

  1. Create two new Files File -> New Text Files
  2. Select a supported language for the files
  3. Go to the Explorer Tab and expand OPEN EDITORS
  4. Right click on the first file and choose Select for Compare
  5. Right click on the second file and choose Compare with Selected
  6. Switch to SemanticDiff

Expected Behavior The semantic diff should display.

Actual Behavior The diff computation fails with Unsupported file extension:.

SemanticDiff Version 0.8.1

VS Code Information

Version: 1.74.3
Commit: 97dec172d3256f8ca4bfb2143f3f76b503ca0534
Date: 2023-01-09T16:57:40.428Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 6.1.0-1-amd64
Sandboxed: No

Additional Context SemanticDiff currently derives the programming language from the file extension which is not available if the file hasn't been saved yet. In this case, we may want to extract the language information from the open editor instead.

mmueller2012 commented 1 year ago

This was fixed in SemanticDiff 0.8.2.