-
Notifications
You must be signed in to change notification settings - Fork 8
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
A total rewrite of the API generation with attention specifically paid to compatibility with sumneko/lua-language-server #12
Draft
ImpleLee
wants to merge
57
commits into
EmmyLua:master
Choose a base branch
from
26F-Studio:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 307cce3 Author: Imple Lee <[email protected]> Date: Sun Mar 7 00:21:25 2021 +0800 add merge as a condition of packaging commit 7361d6c Author: Imple Lee <[email protected]> Date: Sun Mar 7 00:19:22 2021 +0800 rename the name of api commit 1031eb2 Author: Imple Lee <[email protected]> Date: Sun Mar 7 00:17:45 2021 +0800 upload the zipped artifact commit 2071439 Author: Imple Lee <[email protected]> Date: Sun Mar 7 00:11:51 2021 +0800 keep the `lua` version the same with my own commit d3adb8a Author: Imple Lee <[email protected]> Date: Sun Mar 7 00:08:30 2021 +0800 test symbolic links commit 52eb08a Author: Imple Lee <[email protected]> Date: Sun Mar 7 00:06:35 2021 +0800 test symbolic links commit 422d4b2 Author: Imple Lee <[email protected]> Date: Sun Mar 7 00:05:19 2021 +0800 test symbolic links commit 10beba3 Author: Imple Lee <[email protected]> Date: Sun Mar 7 00:03:00 2021 +0800 fix enum description commit 477badf Author: Imple Lee <[email protected]> Date: Sun Mar 7 00:00:35 2021 +0800 add upload-related actions commit b9300ad Author: Imple Lee <[email protected]> Date: Sat Mar 6 23:55:28 2021 +0800 fix repository position and checkout submodules commit 6ba8c47 Author: Imple Lee <[email protected]> Date: Sat Mar 6 23:51:51 2021 +0800 fix `lua -v` commit 7b5c815 Author: Imple Lee <[email protected]> Date: Sat Mar 6 23:49:35 2021 +0800 try another lua library commit ad78619 Author: Imple Lee <[email protected]> Date: Sat Mar 6 23:45:20 2021 +0800 second try on github actions commit b9c2c7a Author: Imple Lee <[email protected]> Date: Sat Mar 6 23:41:56 2021 +0800 first try on github actions
maybe Github will automatically zip it again...
Also note that to correctly clone this module, you should recursively clone with symbolic links enabled( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this
This is a fork that basically rewrite the entire API generation, and I have also documented some known limitations. This rewrite specifically targets the Lua language server on VS Code without much attention paid to compatibility to the original EmmyLua, so I only want to ask for a draft pull request for now, and when the API generated can also be smoothly loaded by an EmmyLua plugin, I will make this a regular pull request.
Why rewrite
We are also developing a game on LOVE, and have been using the Lua language server on VS Code. The old API generated is kind of incompatible with that plugin, so I made some modification. Some time later, I realize that, to cover more information provided in the original lua table, maybe it is better to just rewrite the whole generation according to its format.
By the way, to make it more friendly to the user, I also automate the API generation procedure with GitHub Actions. (Note that the link in the README points to GitHub Actions in my own fork.)
Also, to make it more modular, I have also made love-api a submodule instead of directories. (In fact the submodule links to my own fork of love-api, and I have made some modification there.)
Why merge
Because I wanted to promote my fork in your issue and just realized that is kind of inappropriateI want to promote this rewrite, and make it a default to somewhere like the default plugins provided in the Lua language server on VS Code...
When to merge
There are still some incompatibilities in the generated API, but I do not have a IntelliJ-based IDE installed on my own computer (neither do I want to), so maybe ... may someone do the favor and report the incompatibility at my issue?
Some possible incompatibilities that just came to my mind include:
-
as a delimiter in the auto-generated type names.这是什么
我在这个fork里基本上重写了API生成算法,并整理了一些目前已知的不足(见我的issue)。这个重写基本上只追求了能让VS Code上的lua插件能加载这些API,而并没有太关注和原来的EmmyLua的兼容性,所以这个pull request以draft的模式申请,等修改到EmmyLua的插件也能很好地兼容的时候希望能从draft pull request改成正式的pull request并得到通过。
为什么要重写
我们也在使用LOVE开发游戏,并且原来就在VS Code上使用sumneko的插件开发。原来生成的API在配合该插件使用时会有这样那样的不兼容,所以进行了一些修改。后来为了能比较全面地覆盖love-api提供的信息,按它的格式,针对地重写了生成的算法。
另外,为了方便使用,还写了一些Github Actions来自动化生产api的流程。(注意README里的action的链接指向的是fork那边的地址。)
另外,为了更模块化一点,将love-api改为了子模块。(实际上使用的是我自己fork的项目26F-Studio/love-api,里面进行了一些修改。)
为什么要合并
说实话,是因为想在这边的issue里推广自己写的fork,但感觉过于ky想推广这个重写,提供到像sumneko的预加载插件之类的地方……
何时应该合并
现在生成的API里还有一些不兼容之处,但我没有IntelliJ家的IDE(也不是很打算有),所以可能……需要哪位好心人帮忙提供一下不兼容之处到fork的issue?
一些我觉得可能不兼容的地方:
-
来在自动生成的类型名字中当分隔符。(这可能是lua language server的一个bug。)