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

"Document using GoFmt" deletes all code in text editor. #2010

Closed
danny-su opened this Issue Sep 9, 2016 · 7 comments

Comments

Projects
None yet
4 participants
@danny-su

danny-su commented Sep 9, 2016

Short Summary

"Document using GoFmt" deletes all code in text editor.

Steps to Reproduce

Open a .go file, Format->Document using GoFmt.

Expected results

All code are formated.

Actual results

All code are deleted.

Platform Information

Komodo IDE v10.1.1, Windows 10 64-bit

Additional Information

-- eg. Error logs, screenshots, workarounds --

@danny-su danny-su changed the title from "Document using GoFmt" will delete all code in text editor. to "Document using GoFmt" deletes all code in text editor. Sep 9, 2016

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Sep 9, 2016

Thanks for the report!

@mitchell-as mitchell-as added this to the 10.2 milestone Sep 9, 2016

@mitchell-as mitchell-as self-assigned this Sep 9, 2016

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented Sep 9, 2016

Note on this: I remember this being reported before but I can't find the report. The issues, if I recall correctly, is that the Go format tool takes a file name and formats it on the disk. Other formatting tools provide a method where you pass in a string, the tool formats it, gives it back, then we dump it into the file.
I wonder if the GoFmt supports input yet?

@Naatan

This comment has been minimized.

Member

Naatan commented Sep 9, 2016

Interesting. If it doesn't support input we should still be able to use a temp file though.

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented Sep 9, 2016

Sure, I'm not saying we can't do it. Main concern is that it won't work with the current Komodo backend for formatting.

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented Sep 27, 2016

Naatan added a commit that referenced this issue Nov 8, 2016

@Naatan Naatan modified the milestones: 10.2.1, 10.2 Mar 1, 2017

@Naatan Naatan assigned Naatan and unassigned mitchell-as Mar 1, 2017

@Naatan Naatan reopened this Mar 1, 2017

@Naatan

This comment has been minimized.

Member

Naatan commented Mar 1, 2017

Need to add an upgrade step to koInitService, only fresh installs would get the fix otherwise.

@Naatan

This comment has been minimized.

Member

Naatan commented Mar 6, 2017

@Naatan Naatan closed this Mar 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment