HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.2k stars 658 forks source link

Add CfNoLookup #11825

Closed Simn closed 4 days ago

Simn commented 4 days ago

This adds a class field flag to mark fields as unlookupable for cases such as #11817. I've only implemented it for statics for now, but there might be other situations where we generate fields that we don't want to explicitly access.

The test I added fails on the unixes for some reason. @kLabz Any chance you could take a look at that?

kLabz commented 4 days ago

Uh. I can repro locally, not sure yet why that completion request fails with {"jsonrpc":"2.0","id":1,"error":{"code":0,"message":"Compiler error","data":["No completion point"]}}

kLabz commented 4 days ago

Oh, it's because Main.hx isn't invalidated, and file time check is not precise enough to see changes made right before. Need to invalidate or wait (or check file time with better precision, I can open a PR for that)

Works fine with runHaxeJson([], ServerMethods.Invalidate, {file: file}); before completion request.

Simn commented 4 days ago

Aaah right, it's always that...