- This topic has 7 replies, 2 voices, and was last updated 5 years, 5 months ago by Brian Fernandes.
-
AuthorPosts
-
nhbnhnbParticipantSteps to reproduce:
1. Open a .ts file.
2. Add a space
3. Save
4. Add another space
5. SaveExpected result:
File is savedActual result:
* File is not saved
* Editor tab is still marked with an *
* A strangely looking error message box pops up in the lower right hand corner of the screen saying:
Failed to save ‘test.ts’: The content on disk is newer. Please compare your version with the one on disk.This issue is reproducable every time.
TypeScript Pack :: CodeMix 1.0.0 com.genuitec.eclipse.code.pack.typescript.feature.group null
on Ubuntu 18.04
Brian FernandesModeratorSorry to hear you’re running into a fundamental break like this, this sounds similar to issues we had in early versions of CodeMix, which have been subsequently fixed. I did try the steps you mentioned and could not reproduce the failure.
1) Can you confirm the version of CodeMix from Preferences > CodeMix > Miscellaneous? Older versions would have it displayed at Preferences > CodeMix.
2) Can you please share your error log with us? You can find it at[workspace_location]/.metadata/.log
3) Does this happen for all TS files in all projects? If you edit another TS file in the same project, or a TS file in another project, do you still see the same behavior?
4) Do you have any other tooling (especially TypeScript tooling) installed besides CodeMix?Thanks!
nhbnhnbParticipantHello Brian,
thank you for your reply.
This issue happens, if and only if the file has some lines ending with \n and some lines ending with \r\n. This seems to be the case for most files in our project. If the file is either completely Unix-style or completely Windows-style, everything is fine.
————————
1. CI 2019.6.19
2. no entries
3. Here it gets interesting. It does not happen on a newly created project. But if I copy an existing file into that project using the project explorer view, the issue does show up. But if I copy the content of a file using CTRL+a, CTRL+c and CTRL+v in the editor view, everything is fine. This really confused me for a while…
4. I de-installed Angelo’s plugins before installing your plugins.
Brian FernandesModeratorThank you for replying with all that detail and the investigation you have already carried out. I have tried to reproduce this internally by mixing up line endings at our end, but could not reproduce any sort of problems. Unless specifically typed over, the line endings also remained the same (they were not all converted one way or the other on save). I have a few questions:
1) Can you send us this file, or any test file which exhibits the problem?
2) I’m assuming that even when you copy the mixed file into a new project, you still see the “content on disk is newer” warning?
3) What VCS is your old project connected to, what about the new project (assuming this is disconnected).Our theory is that when you’re saving a file the first time, an external process is modifying the file, so when you attempt to do it a second time, we are out of synch. Perhaps this process would run and subsequently modify the file only if it found mixed endings that needed to be fixed? One way of testing this would be to save the file once, and then edit it in a hex editor outside Eclipse to see if the something has changed. Does any of this sound plausible?
Brian FernandesModeratorQuick update – we’ve been able to replicate the problem internally, and believe we know the cause of the issue as well. Needless to say, this is a high priority issue and we’re working on a fix right now.
No further action required at your end, we’ll let you know when a fix is available. Thank you again for the report.
Brian FernandesModeratorWe have a fix for the issue, and would appreciate it a great deal if you could give it a try, and let us know if it fixes the issue for you:
1) Download this file.
2) Shut down Eclipse
3) Unzip the contents of the zip into your[eclipse_installation]/plugins
folder. It should replace a file with the same name in that folder. You can take a backup of the existing file before replacing it, if you like.
4) Start EclipsePlease let us know if this fixes the issue for you. Thanks!
nhbnhnbParticipantHello Brian,
wow, that was quick!
I can confirm that the fix works.
Thanks a lot
Hendrik
Brian FernandesModeratorHendrik,
Super! Thank you for testing that for us and letting us know. This fix will be safely delivered in our next release.
-
AuthorPosts