-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
begin using emmylua_ls #33344
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
base: master
Are you sure you want to change the base?
begin using emmylua_ls #33344
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
5d4ea53
to
e2b14a6
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@@ -88,6 +88,7 @@ local function modifiers_from_number(x, modifiers_table) | |||
return modifiers | |||
end | |||
|
|||
--- @async |
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.
What are the implications of this?
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.
Any function that has a route to coroutine.yield()
is marked by the tool as async. The @async
annotation is make this explicit. This helps find bugs where the code is called from the main thread but acidentally enters a code path that may yield.
I've got gitsigns fully typed with @async
here and have found it a very useful diagnostic as it finds places where functions that are expected to execute synchronously are calling async functions.
3d1334c
to
c71353e
Compare
emmylua-check: luv | ||
-emmylua_check \ | ||
--output-format=json \ | ||
--config=$(PWD)/.luarc.json \ |
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.
You probably want to use CURDIR
instead of PWD
. The latter will be incorrect with make -C <path>
(among other things). In fact, you basically never want to use PWD
.
Explained well here: https://stackoverflow.com/a/52447088
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.
Thanks. I'll make sure to use CURDIR
instead from now on. This target is only temporary. The final form will be in cmake.
948aad6
to
fd6d0ea
Compare
18c8ba4
to
3d1ea3b
Compare
80fd0e2
to
ee1639f
Compare
I don't plan on merging this as-is, just a place to hold all the fixes so I can post issues upstream.
Once this gets big enough, I'll cherry pick all the changes which are LuaLS compatible.