-
Notifications
You must be signed in to change notification settings - Fork 220
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
[Haxe 3.3] Adds Support of -D display-stdin. closes #1311 #1318
Conversation
Hmmm, what about multiple unsaved files at the same time? It seems it only gets the content of the current file are the rest are ignored. Am I right? Can we pass the contents of multiple files or only the one you want to get completion from? if it's the second then this seems to have severe drawbacks, doesn't it? |
It's the second. We thought about this, but decided not to overcomplicate things for now, since the main issue was that IDEs basically had to save the current file on each keystroke and this fixes it. To do it "properly", we would have to do something like e.g. Roslyn does, when source files are synchronized in the compiler with IDE's in-memory contents using some protocol. Haxe is not ready for this right now, so the current display-stdin solution is the best we can do for the time being. |
By the way, I'm not really familiar with FD's codebase, but it looks like this PR doesn't implement passing stdin in the non-server mode, which can also be done (you just call |
(see description here HaxeFoundation/haxe#5120) |
Then I guess FD should still save the other files to be on the safe side? |
I think that I could save other modified files, but not current file. @Neverbirth what you this about this? |
It seems we wrote mostly at the same time, yeah, I'm OK with that one. |
@Neverbirth fixed |
Amazing stuff guys |
@elsassph @Neverbirth @Meychi what about this PR? |
HaxeComplete GetHaxeComplete(ScintillaControl sci, ASExpr expression, bool autoHide, HaxeCompilerService compilerService) | ||
{ | ||
var sdkVersion = GetCurrentSDKVersion(); | ||
if (hxsettings.CompletionMode == HaxeCompletionModeEnum.CompletionServer && new SemVer("3.2.1").IsOlderThan(sdkVersion)) |
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.
Maybe do a semver greater-than-or-equal 3.3.0 if it's possible; who knows, a 3.2.2 fix release could happen.
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.
Fixed 7c68005
|
||
protected override string GetFileContent() | ||
{ | ||
return Sci.Text; |
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.
Is there any possible filesize concern here? What about if you're editing a very large file?
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.
My test file contains more than 20,000 lines of text and all ok)
Implemented SemVer::Equals(semVer) Implemented SemVer::IsGreaterThan(semVer) Implemented SemVer::IsGreaterThanOrEquals(semVer)
No description provided.