@codua/codeoutline-win32-x64 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/README.zh-CN.md +4 -0
- package/bin/xnet.exe +0 -0
- package/build-info.json +1 -1
- package/editors/codeoutline.vsix +0 -0
- package/editors/zed/extension.wasm +0 -0
- package/keys/update-ca.crt +18 -18
- package/package.json +1 -1
- package/scripts/codeoutline/analysis/graph.lua +9 -16
- package/scripts/codeoutline/analysis/lua/lua_bindings.lua +165 -22
- package/scripts/codeoutline/analysis/receivers.lua +164 -11
- package/scripts/codeoutline/command.lua +3 -3
- package/scripts/codeoutline/lang/lua.lua +3 -2
- package/scripts/codeoutline/query/completion.lua +11 -1
- package/scripts/codeoutline/query/definition_candidates.lua +81 -61
- package/scripts/codeoutline/query/navigation.lua +69 -29
- package/scripts/codeoutline/shared/rules.lua +9 -1
- package/scripts/codeoutline/update_sequence.lua +1 -1
- package/scripts/codeoutline/version.lua +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,11 @@ codeoutline --version
|
|
|
23
23
|
codeoutline --help
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
To fully uninstall a global npm installation, run `codeoutline remove`. It stops
|
|
27
|
+
the shared service, removes integrations and default user data, and then
|
|
28
|
+
uninstalls the npm package. npm hides the install script's output by default.
|
|
29
|
+
Use `--foreground-scripts` to see the uninstall reminder during setup.
|
|
30
|
+
|
|
26
31
|
To choose each detected AI tool and Zed, VS Code or Cursor editor during global
|
|
27
32
|
installation, use npm's foreground mode. Each prompt defaults to installation.
|
|
28
33
|
The shared service then starts automatically, without another install command:
|
package/README.zh-CN.md
CHANGED
|
@@ -19,6 +19,10 @@ codeoutline --version
|
|
|
19
19
|
codeoutline --help
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
全局安装后,如需完整卸载,请运行 `codeoutline remove`。它会停止共享服务、
|
|
23
|
+
清理集成和默认用户数据,再卸载 npm 包。npm 默认隐藏安装脚本的输出,
|
|
24
|
+
加上 `--foreground-scripts` 即可在安装时看到卸载提示。
|
|
25
|
+
|
|
22
26
|
如需在全局安装时对检测到的每个 AI 工具和 Zed、VS Code、Cursor 逐项确认,
|
|
23
27
|
请使用 npm 的前台模式。每项默认安装,随后自动启动共享服务,无需再次执行安装命令:
|
|
24
28
|
|
package/bin/xnet.exe
CHANGED
|
Binary file
|
package/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"updateSequence":26,"target":"win32-x64","version":"0.3.7","runtimeCommit":"be18042e9091379bf45624771a4e8819d2709f84","runtimeBuild":"4f732f99896571583bf36c62f9e00127fdffe245f43bacd27ee38e08d9cd1298","lua":"LuaJIT 2.1.1774896198","sourceCommit":"a68de1768661bd1b9b30f9b5e0168cb0fbcd9769","sourceDirty":false,"releaseReady":true,"note":"Release build from a clean checkout","sha256":{"scripts/codeoutline/analysis/rust/rust_packages.lua":"c6886a77017bf039499d93027b28bd354599875a5d3705f622ea3366512432e8","scripts/codeoutline/analysis/automatic_events.lua":"2d81c3e943964680e13b6005b823f05637c31891f3759fec7074e14d20b7f150","scripts/xupgate/signature.lua":"f07de8a4093d08cc69d3c1d8296d23318c5d81344ece788d4453a9b3b700f000","scripts/codeoutline/analysis/rust/rust_resolution.lua":"2b9ec789243cda63107a721e8d907faa3d3d5c18f21a69b634db4deac9e586ee","scripts/codeoutline/analysis/js/js_evidence.lua":"523913dcadb37ec433b31103c12218c383001851b7cf965cf4505065917d8afe","scripts/codeoutline/lang/csharp.lua":"93762ccefd326fb04fcc5c5dd73821241216e9374de2abbe9e4f53fe5af1c160","scripts/codeoutline/analysis/shared_events.lua":"88fb64d66e6d41da3beeaeff86f6357b5a8ceae16003ba194aaa01171e4874f1","scripts/codeoutline/runtime/index_worker.lua":"0bfbf38fe9cb6e8a92b958028c6df9970575f881330dd4568a621463d20497b8","scripts/codeoutline/analysis/js/js_resolution.lua":"427a4656216878487e9c11a02faa4f6c4240fb00b126ec298479a45c12f3ecce","scripts/codeoutline/lang/go.lua":"027afb44a9c3a92aa74b9af230d8571963183697529fd41fe915ffa831f3e8da","scripts/codeoutline/analysis/static_dispatch.lua":"9940f4c4317e8f5345a9f39178fac639278bc186265a72369f1be808bdeebd29","scripts/codeoutline/runtime/parse_worker.lua":"4cb620924fbe43d0f9a411c689060575220c0b2947d09fba266fe552ad003cfe","scripts/codeoutline/analysis/cpp/cpp_bindings.lua":"06adeb3b4a56d97555b6e4bd775de8dd1c9d2331474b670d53188d4fbe4b3b0c","scripts/codeoutline/analysis/js/js_workspace.lua":"230df95605e0ce47a940f425611d426eaa3d4de262736e3dfe3bd1f15db956b4","scripts/xupgate/http_codec.lua":"a5b0f127105ba6dbd4a518a214ca55e22c7510e6b2fc8c25c325898d8346ef8c","scripts/codeoutline/analysis/type_bases.lua":"470fdcfffc3ded8bd3c9608db6128539757c91692bc714173dbb1bcdf8344e36","scripts/codeoutline/protocol/lsp_trace.lua":"41e6e67866eb6c862cf11337a637a94505f62a29533a9dbd6226d3b801444597","codeoutline.cmd":"52ee46a6010ff1161369e50df76e96beed2d6152f8c8e5095f73bc0b60a7629b","scripts/codeoutline/analysis/js/ts_implementations.lua":"2e92afd3b76a3dab73b99d7900dd357d37b9749a11c5bc11946e0d62d39e7be8","editors/zed/extension.wasm":"22655024875868084fc43c92abdccfeb03773d40bf03d5ce18068384c3122fd9","scripts/codeoutline/service.lua":"795797bf7d3b329e67fff5b3d8bd9ab2681dfb2472f7d9a8236756bea67c0c56","scripts/codeoutline/analysis/type_uses.lua":"eb1ee73f0a3cb67ef3b92ed1a8b7222fbc26137f743e466338e180b416ea12cb","editors/zed/extension.toml":"2c5e28806d71e03b0c421d35b8a9aa9e1d428038417aebd7bdf3c871b22d93f4","editors/codeoutline.vsix":"4c5552495a7025c28d51cd870f28cc641dc3e7124d3cb9ba3c28cc9081cb7c7b","bin/xnet.exe":"b3e030912ad8180e66c6801c4b2c986f6325f5ac5f07a5f012f72da8b6332486","THIRD_PARTY.md":"a0d596a8600c5244b27c1426a81b4ec7046d213d733ec6b4287a4b1e8db501b5","DISTRIBUTION.md":"7f1b6d02bd3fa71a7d02cbd57bebd82fbd930d96c1cb32a5f15764466c88ef12","scripts/codeoutline/cli.lua":"28b058bbb3c86d9e6a7603c52ef62eacc8978af6c2201e61bfb8100bc79be4b2","README.zh-CN.md":"d65838da7d26d7f35df6d60c3c24b2142219131197b23e237128c83e2602250c","README.md":"291594269b54eb0690bad6c05b06585cd28989e9ddde9b3cc5422a6a2a944fb3","scripts/codeoutline/analysis/cpp/cpp_macros.lua":"fa79cd9ea652be2a921f930d0ec21dcfc1d61b15e0ea2cd22ad4141eeb4e9552","scripts/codeoutline/analysis/lua/foreign_lua.lua":"c217da78314febeff5d20c9d7e9f68e25089d1e76f4350405d83af494deac3dc","scripts/codeoutline/shared/control.lua":"b67a2e382e021f0793ef313aa4e71faab76f6cb77ca127f499d01ae96f36a8db","licenses/mbedtls.txt":"9b405ef4c89342f5eae1dd828882f931747f71001cfba7d114801039b52ad09b","scripts/codeoutline/command.lua":"0b16dc8b960569bc7fc3d6c363f41d0672da8271de05ca0728ae5c1deb471fc6","licenses/lua-cmsgpack.txt":"8edfdc5282278a1268d8a6ee52f9245f1a5fe3d1c8065be00330196b1de49873","scripts/codeoutline/analysis/cpp/cpp_receivers.lua":"4f9bea5325d0ccd3ddfe5117bf8891408d41988bdc94d6a388363624b64df0f3","licenses/luajit.txt":"1b10a02c9474cb908da2d87bc908edd8798f9ad28d9a8c53fbd05c13227f7394","scripts/codeoutline/lang/js.lua":"ff326c9ef41deb5ec7f961a556350b69c4b601a176d696114a2096d5118c2379","LICENSE":"1b63179362acd482b4a9a07ca526b3fce6d9103dcded361de2159ade174568b6","licenses/libdeflate.txt":"41b60f2caab6bffdd5ba360687bd23ca653c0a1235c00380ecffc939b4cd8d75","licenses/xnet2lua.txt":"1aa8af3df70f60f1ebf2d23e14c27af1606057ad9c32a9a0d15fd76cff257532","scripts/codeoutline/analysis/cpp/cpp_types.lua":"18e68635a30f86a8975cc556839ed2be961685353dec290749fd169d3049cf16","scripts/codeoutline/lang/kotlin.lua":"8b5dabbbede62bf0a1376414f7424e6dd3a248739cc015c2364d143901230d86","scripts/codeoutline/analysis/lua/lua_callback_loops.lua":"2b28f338ebc23c8a6543fad61e932ceaee409512b69a71711d385fcc0bdafd4c","lib/xhttp_codec.lua":"a5b0f127105ba6dbd4a518a214ca55e22c7510e6b2fc8c25c325898d8346ef8c","codeoutline":"1909247ba17be9d0fe14d689ea7c1c955013b5b79f05336e2161b6f161c4c394","scripts/codeoutline/indexing/cache_repairs.lua":"7e31a6118c3e991382ae2751a8b1d4913bcbf4e24d35f56253f46e156e8420a5","scripts/codeoutline/lang/lua.lua":"73f2f83ca086fb64e7b26b86d0a3ba4a1a2028a68df52e3cf9dce25cd73929a9","keys/update-public.pem":"7ff853339e19631b20ed3fa2cf221daa31c581e2e84d161b344b8f06de6562a8","scripts/codeoutline/analysis/lua/lua_literal.lua":"5fdd90a872988622337410c7e516d41b789ce4326c4aa6dddcd61998fe5aef90","scripts/xupgate/proxy.lua":"5bf532e7005f44555d6a5277336e5ad395af060585c13a1cdc2441de50e0dcff","scripts/codeoutline/analysis/csharp/csharp_bindings.lua":"722c8fb2b133bbe09179293b068967fe70e7a2e8942380068a04a97b1283a43d","scripts/codeoutline/lang/python.lua":"a0b2b64fe42e585ec922304d3b8ecd6c679a97fecfe1bc56014f1556558c9387","scripts/codeoutline/indexing/cpp_fragments.lua":"6be4c3f89c234b6982235981d9f128875790acd5d22f80fe11290bb99af903a3","scripts/codeoutline/query/completion.lua":"688d1ca54bbbd5c7dad40286251b2ad1c404c66f5bc61da1e5dea065a615ffd8","scripts/codeoutline/analysis/ordinary_bindings.lua":"ec9f3609650f2ec05dd429e178118a4dded9b6c40cfecdd5efcdeb5e0bb2ad94","keys/update-ca.crt":"d9b5ec3d4628de9c5559871f39841a5f84d47c53ded4d58d6e3bba2b4c669a02","scripts/codeoutline/lang/rust.lua":"45d0a9c535d674b31990ba1052f97b2da2a98565a68294937429f443ac1c8da5","scripts/codeoutline/analysis/dispatch_aliases.lua":"05f3b06d7d890089b8e18a2e849df9a5ec433bce5312a22d80b7be417e614373","scripts/codeoutline/query/coverage.lua":"3a4a0e5f5ea8b7ea4a0be62c7c1a202153cf0c5c3423f78b100aecbb39513d5e","scripts/codeoutline/indexing/index.lua":"459a02dd0c436df968703b74b9fb4624b6fdb4adfffc2383c7abbdb683ef6160","scripts/xupgate/http_client.lua":"e910132b82779969926f959fc876da4aa4807559f91d1d01d32b263f1784e01d","scripts/codeoutline/main.lua":"9f884e383721888af68fd41f3dfdd816e65e4d569346664e390ee086a4b55fa3","scripts/xupgate/common.lua":"e449f64c92e4ef46d0c9f4c815aacb38866392cbc3502544d3a1985f9dc4f978","scripts/codeoutline/analysis/foreign.lua":"4c8fdbe398f2b43be861ce0e4915916956c1fb2af6c10c5c04a9654e8aac2bf2","scripts/xupgate/client.lua":"88d8ccdd54282257d233af714fad22abc7af4b9ad65882f58330cc8814461985","scripts/codeoutline/indexing/parse_pool.lua":"5a35dad6a6a44a2dccd793a694e65e5a2bdb621911d56bdb32375ce8295889d8","scripts/codeoutline/version.lua":"d664c88a2d0632fc98b733a6e66e79b049e37b581f5ce0def27439a2df8d8210","scripts/codeoutline/update_sequence.lua":"3e941d94d7779e4d6c362866828f9c2d823683068cd31b502d0e4b0b10aacf6f","scripts/codeoutline/query/documents.lua":"1ed27cb6f805c1ff9acbc070f16e582b71c4a330c5539fb3d7b8ed4150c82bdf","scripts/codeoutline/analysis/function_values.lua":"d10bc4a2a82a90a611daf3c2bb26c41da43543f7831711bd4b0c311ad5569d80","scripts/codeoutline/updater.lua":"267c4b6e9704fce710f44d1bfceac69c1857e34e064d8444d7890f0e10d921c7","scripts/codeoutline/shared/text.lua":"56ee63c7b4cc63fe12d8ecd5b99410281463cdba8ca112f484e402ca6dfc5b90","scripts/codeoutline/shared/rules.lua":"b01402863062435a6d31a4a5a90208319876fdb444a76c75fd0c45ea8ee6fee5","scripts/codeoutline/parsing/common.lua":"6c883bb69827fd9e88e35f7ecc380f43e3a839fbea127e46ad6923c44beeb590","scripts/codeoutline/shared/path.lua":"407bd960c1ad04e5006b321ce33263393bb40eee5dee5c123be9b36d3ad10937","scripts/codeoutline/runtime/update_worker.lua":"9557e5207e440fccf15e8255b3fb1c8933ad33d1f352c19987fb825f7db45706","scripts/codeoutline/runtime/idle_gc.lua":"2025b037b593b5e19714b6e283c8a0490146e591de795988a543a161277714f1","scripts/codeoutline/lang/cpp.lua":"e13eaf1882cddb20a7a651d13136e06ca42c482cf7ac53de38bf82fdda786727","scripts/codeoutline/install/agent_config.lua":"041e1736f7be060b9eac9f3ced0b20f50854d94af2cddfa22c5d3868f3fc1681","scripts/codeoutline/parsing/language_detect.lua":"4c9fd0fcd270cfd123e9e9d0bcc2f3635cd19a8784098a03cee6bce5ac593e8c","scripts/codeoutline/analysis/cpp/cpp_includes.lua":"7a2de73f528a608eb89aea0f5fe8d18b3ef51d6e9966106af0ecd41f03304d07","scripts/codeoutline/analysis/go/go_frameworks.lua":"2f2a692a6dbda384abf32af0750bb40e99f1bc3e83f039215f0eaf750cf77f65","scripts/codeoutline/protocol/lsp.lua":"f236c0407dc8b479c883cd526a19dca61efd999926e70d564d299c3972074224","scripts/codeoutline/query/navigation.lua":"e550b2a630cb61a6e5123b40930cadde0952ad3b2adba5fadfbb4146c209defa","scripts/codeoutline/parsing/parse.lua":"81dacf0f07440f1a7516732c39251d0d7f07cef77f7d8f9f25bdacd96c7919a0","scripts/codeoutline/analysis/python/python_bindings.lua":"ec4217f77345282a5522696c1b53e3886fb0e9a45736c10613fcb0fd4f016160","scripts/codeoutline/query/query_report.lua":"f53c24c48f3f94dd17c7f0be5501865aff0af73d926f27e03d9849c168996462","scripts/codeoutline/query/explore.lua":"04c670153afe4a2052a06ff9f21bec197ac82faaba53a7bd3335c93d31469544","scripts/codeoutline/analysis/go/go_methods.lua":"71832a6b8941a6b6f9155c59cec2da7c33108a132608cdaa2cd85076c4e241cf","scripts/codeoutline/parsing/xscan.lua":"bd95a1b0b7022d029a41aab615897502478b5834612505e8d299343cb5ca8ef9","scripts/codeoutline/query/on_demand.lua":"7faf5e4d5f21ca73903903703178d9d983c98d1ddb30d9ca5656bbae676e1f1a","scripts/codeoutline/query/external_headers.lua":"9b8d8a87a67839d4da1d5eced619d7c54431dbff32b07d505ea54350bdc2de3b","scripts/codeoutline/analysis/receivers.lua":"4729e09ecac8c3d24367a9db531e58be42c73547373118987a8b83ef9c32ff17","scripts/codeoutline/query/query_filters.lua":"dfaac210f8ebf53d0e4515866b0128a77ff77cb0c8d7d558b71a4eaf9f2b32ef","scripts/codeoutline/analysis/go/go_modules.lua":"432dc66435fe93fbc2a7d1aa4212ae03ad5454effd18ffb3e06c2eca6a169aab","scripts/codeoutline/query/definition_candidates.lua":"0e9fe37df6e897b7203ebbe3214ee0f92410a135e0d4decdfae1842702ab75a0","scripts/codeoutline/query/callers.lua":"b1870f2d08c2274ce743d513560ce9329e16236399e065027685dbf8694c82ab","scripts/codeoutline/query/affected.lua":"7fe6ae466b314957f39ceb8fcc1f0a5339d523c86f99ce5735599a2477865b72","scripts/codeoutline/analysis/resolution.lua":"ec137a38abfdcb7f366861a123480a3b3125a76acf7399a784f8fb207e833d0b","scripts/codeoutline/install/install_prompt.lua":"588c90cd2955756b13a96e1f0d17145a51eda239c9cf179d5eac195532ee9f49","scripts/codeoutline/analysis/graph.lua":"e434dac63c5291f76faca97ee8b8e94f9ac5a9b8c529aeab56ca9de9a9d4bfd1","scripts/codeoutline/protocol/http.lua":"bd558939df95e4a908551f43ca5bf0eb68d7a16b8eb20b1b4076a5ece20956b7","scripts/codeoutline/protocol/mcp.lua":"1e65df410d6cede3cc0fb227ea406a5e7e178d425b5ed861f73d8b748fbdbae7","scripts/codeoutline/query/search_ranking.lua":"153987a2915c48516b8dca10121b8efa2b116af8cf82200243e45f1fd5feffb4","scripts/codeoutline/lang/c.lua":"f341d250a09a937d8548657991bdeac0aec8de26b7d056292709126ee999c6f1","scripts/codeoutline/analysis/lua/lua_bindings.lua":"3639c8336b4f4f12be6a34842fb0a1b128d32d3125099a7dbd182a8a9ce0c364","scripts/codeoutline/analysis/implementations.lua":"ffcd7288eae967c5628c85b8e55d93c826b30524956212dccca7d150ac7ac3be","scripts/codeoutline/install/editor_install.lua":"a69f5e123f7fbdb58fe2da691c744c0668a11ccd88f17a98167038c80a5d4cff","scripts/codeoutline/query/type_hierarchy.lua":"e5ccfa85ac63c636f50d33310274559624c08954e1f77a197ff941d799669b37","scripts/codeoutline/analysis/cpp/cpp_implementations.lua":"87d637812626672f44226e245f94d675e209a83e4cd2d6b2a320ed9d60a6a3d0","scripts/codeoutline/analysis/rust/cargo_toml.lua":"78f4f8bcf14f8db80bdac9fc2568988372d3cca222f82b34708f5330c00c8771","scripts/codeoutline/install/daemon.lua":"06863991135cc9a85f07bca8310296f0df9e415b3e2de97ae006393e777b009b","scripts/codeoutline/analysis/indirect.lua":"38e15056251400f840604af29fb3ddacac7915d2cf1c2bf7870d481497cc8831","scripts/codeoutline/query/type_references.lua":"9119a2c55b2ae825190ac50d97d6a4cacacd33a707cd1e98b532c4a7d02e4a0c","scripts/codeoutline/install/agent_install.lua":"32409b49dd1e8436169f334587b4994c9d6868ed3ff5c4eaed09b4b3b8ca12c4","scripts/codeoutline/lang/java.lua":"3c6b2d844202cbe988644e94090be76e7f8a2a906f4412aefcbd06e9fb56a01b"}}
|
|
1
|
+
{"target":"win32-x64","runtimeCommit":"be18042e9091379bf45624771a4e8819d2709f84","version":"0.3.9","lua":"LuaJIT 2.1.1774896198","sourceCommit":"d13c133a8a1edaed1a306b8e3d9efe136ad2782e","sourceDirty":false,"releaseReady":true,"note":"Release build from a clean checkout","sha256":{"scripts/codeoutline/query/affected.lua":"7fe6ae466b314957f39ceb8fcc1f0a5339d523c86f99ce5735599a2477865b72","scripts/codeoutline/analysis/type_uses.lua":"eb1ee73f0a3cb67ef3b92ed1a8b7222fbc26137f743e466338e180b416ea12cb","scripts/codeoutline/analysis/graph.lua":"70eed1852ca77615de7530947b1278a83ae38e04d1a26930251bc506de357541","scripts/codeoutline/lang/cpp.lua":"e13eaf1882cddb20a7a651d13136e06ca42c482cf7ac53de38bf82fdda786727","scripts/codeoutline/query/callers.lua":"b1870f2d08c2274ce743d513560ce9329e16236399e065027685dbf8694c82ab","scripts/codeoutline/analysis/python/python_bindings.lua":"ec4217f77345282a5522696c1b53e3886fb0e9a45736c10613fcb0fd4f016160","scripts/codeoutline/cli.lua":"28b058bbb3c86d9e6a7603c52ef62eacc8978af6c2201e61bfb8100bc79be4b2","scripts/codeoutline/analysis/implementations.lua":"ffcd7288eae967c5628c85b8e55d93c826b30524956212dccca7d150ac7ac3be","scripts/codeoutline/query/completion.lua":"ff2c4102b9a73042f84e823e13ce685aa1d164ee84765db513da2b8ae515e763","scripts/codeoutline/analysis/receivers.lua":"3b2d09cab61dac5549e96fb007d0538661391c1d4f25573d1872221d8c7b2d3c","scripts/codeoutline/command.lua":"3e85c469d3f4eabeb9bae662c6fa6daf46eccb47886f40feb7406a7f486bc553","bin/xnet.exe":"951c9f93e538f4679f23192aebab200bf6c0cb5768311fd0b14c7ee5ffb84f85","scripts/codeoutline/lang/java.lua":"3c6b2d844202cbe988644e94090be76e7f8a2a906f4412aefcbd06e9fb56a01b","scripts/codeoutline/analysis/resolution.lua":"ec137a38abfdcb7f366861a123480a3b3125a76acf7399a784f8fb207e833d0b","scripts/codeoutline/query/definition_candidates.lua":"eeb78de0c92e11729d84d4e338cba9424e73e8616bb251c533a4c2e5a201bf8a","scripts/codeoutline/lang/js.lua":"ff326c9ef41deb5ec7f961a556350b69c4b601a176d696114a2096d5118c2379","scripts/codeoutline/query/documents.lua":"1ed27cb6f805c1ff9acbc070f16e582b71c4a330c5539fb3d7b8ed4150c82bdf","codeoutline":"1909247ba17be9d0fe14d689ea7c1c955013b5b79f05336e2161b6f161c4c394","scripts/codeoutline/analysis/js/js_evidence.lua":"523913dcadb37ec433b31103c12218c383001851b7cf965cf4505065917d8afe","scripts/codeoutline/lang/kotlin.lua":"8b5dabbbede62bf0a1376414f7424e6dd3a248739cc015c2364d143901230d86","codeoutline.cmd":"52ee46a6010ff1161369e50df76e96beed2d6152f8c8e5095f73bc0b60a7629b","scripts/codeoutline/query/explore.lua":"04c670153afe4a2052a06ff9f21bec197ac82faaba53a7bd3335c93d31469544","scripts/codeoutline/analysis/rust/cargo_toml.lua":"78f4f8bcf14f8db80bdac9fc2568988372d3cca222f82b34708f5330c00c8771","scripts/codeoutline/version.lua":"3c66db508542c89884cb96cb7cdcf504f7e9dd94b75b0c4f8a83962e5e7065c3","scripts/codeoutline/lang/lua.lua":"813efafda42e27d0bc9b4bdbf1e9e481ec8b834a6127db54e1ed56e61f7d5626","scripts/codeoutline/analysis/js/js_resolution.lua":"427a4656216878487e9c11a02faa4f6c4240fb00b126ec298479a45c12f3ecce","scripts/codeoutline/query/external_headers.lua":"9b8d8a87a67839d4da1d5eced619d7c54431dbff32b07d505ea54350bdc2de3b","scripts/xupgate/common.lua":"e449f64c92e4ef46d0c9f4c815aacb38866392cbc3502544d3a1985f9dc4f978","keys/update-public.pem":"7ff853339e19631b20ed3fa2cf221daa31c581e2e84d161b344b8f06de6562a8","scripts/codeoutline/lang/python.lua":"a0b2b64fe42e585ec922304d3b8ecd6c679a97fecfe1bc56014f1556558c9387","editors/codeoutline.vsix":"c33d53057e8ee1b8fed04898843b74157bd079a8d1ddf0b09dbb27c550a8f95d","scripts/codeoutline/analysis/js/js_workspace.lua":"230df95605e0ce47a940f425611d426eaa3d4de262736e3dfe3bd1f15db956b4","scripts/codeoutline/indexing/index.lua":"459a02dd0c436df968703b74b9fb4624b6fdb4adfffc2383c7abbdb683ef6160","THIRD_PARTY.md":"a0d596a8600c5244b27c1426a81b4ec7046d213d733ec6b4287a4b1e8db501b5","scripts/codeoutline/lang/rust.lua":"45d0a9c535d674b31990ba1052f97b2da2a98565a68294937429f443ac1c8da5","DISTRIBUTION.md":"7f1b6d02bd3fa71a7d02cbd57bebd82fbd930d96c1cb32a5f15764466c88ef12","scripts/codeoutline/query/on_demand.lua":"7faf5e4d5f21ca73903903703178d9d983c98d1ddb30d9ca5656bbae676e1f1a","scripts/codeoutline/analysis/js/ts_implementations.lua":"2e92afd3b76a3dab73b99d7900dd357d37b9749a11c5bc11946e0d62d39e7be8","README.zh-CN.md":"d84d8534c4715bb3e92a3928989e0611c17a34b1bee8d812f1b2afb3760a3126","scripts/codeoutline/main.lua":"9f884e383721888af68fd41f3dfdd816e65e4d569346664e390ee086a4b55fa3","README.md":"eac24ff9da12607b720c41059355498351fdd22a8dad1db400333a28f5dc83a3","scripts/codeoutline/query/query_filters.lua":"dfaac210f8ebf53d0e4515866b0128a77ff77cb0c8d7d558b71a4eaf9f2b32ef","scripts/xupgate/proxy.lua":"5bf532e7005f44555d6a5277336e5ad395af060585c13a1cdc2441de50e0dcff","scripts/codeoutline/query/navigation.lua":"a2c444ea0408f528c366674997cd71b1e22691a32150e6f590a3fab1d5dbfeb4","scripts/codeoutline/indexing/cache_repairs.lua":"7e31a6118c3e991382ae2751a8b1d4913bcbf4e24d35f56253f46e156e8420a5","licenses/luajit.txt":"1b10a02c9474cb908da2d87bc908edd8798f9ad28d9a8c53fbd05c13227f7394","scripts/codeoutline/query/query_report.lua":"f53c24c48f3f94dd17c7f0be5501865aff0af73d926f27e03d9849c168996462","scripts/xupgate/signature.lua":"f07de8a4093d08cc69d3c1d8296d23318c5d81344ece788d4453a9b3b700f000","LICENSE":"1b63179362acd482b4a9a07ca526b3fce6d9103dcded361de2159ade174568b6","scripts/codeoutline/analysis/cpp/cpp_macros.lua":"fa79cd9ea652be2a921f930d0ec21dcfc1d61b15e0ea2cd22ad4141eeb4e9552","scripts/codeoutline/query/search_ranking.lua":"153987a2915c48516b8dca10121b8efa2b116af8cf82200243e45f1fd5feffb4","scripts/codeoutline/parsing/common.lua":"6c883bb69827fd9e88e35f7ecc380f43e3a839fbea127e46ad6923c44beeb590","scripts/codeoutline/analysis/automatic_events.lua":"2d81c3e943964680e13b6005b823f05637c31891f3759fec7074e14d20b7f150","licenses/xnet2lua.txt":"1aa8af3df70f60f1ebf2d23e14c27af1606057ad9c32a9a0d15fd76cff257532","lib/xhttp_codec.lua":"a5b0f127105ba6dbd4a518a214ca55e22c7510e6b2fc8c25c325898d8346ef8c","scripts/codeoutline/analysis/cpp/cpp_receivers.lua":"4f9bea5325d0ccd3ddfe5117bf8891408d41988bdc94d6a388363624b64df0f3","scripts/codeoutline/query/type_hierarchy.lua":"e5ccfa85ac63c636f50d33310274559624c08954e1f77a197ff941d799669b37","scripts/codeoutline/parsing/language_detect.lua":"4c9fd0fcd270cfd123e9e9d0bcc2f3635cd19a8784098a03cee6bce5ac593e8c","scripts/codeoutline/runtime/index_worker.lua":"0bfbf38fe9cb6e8a92b958028c6df9970575f881330dd4568a621463d20497b8","editors/zed/extension.toml":"2c5e28806d71e03b0c421d35b8a9aa9e1d428038417aebd7bdf3c871b22d93f4","scripts/xupgate/http_codec.lua":"a5b0f127105ba6dbd4a518a214ca55e22c7510e6b2fc8c25c325898d8346ef8c","scripts/codeoutline/analysis/cpp/cpp_types.lua":"18e68635a30f86a8975cc556839ed2be961685353dec290749fd169d3049cf16","scripts/codeoutline/parsing/parse.lua":"81dacf0f07440f1a7516732c39251d0d7f07cef77f7d8f9f25bdacd96c7919a0","scripts/xupgate/http_client.lua":"e910132b82779969926f959fc876da4aa4807559f91d1d01d32b263f1784e01d","scripts/codeoutline/indexing/parse_pool.lua":"5a35dad6a6a44a2dccd793a694e65e5a2bdb621911d56bdb32375ce8295889d8","scripts/xupgate/client.lua":"88d8ccdd54282257d233af714fad22abc7af4b9ad65882f58330cc8814461985","editors/zed/extension.wasm":"9d96fc4cff01cc0a354240325d7b6596cba1e6c5e4fedd4d2ecb3f31caa4dfec","scripts/codeoutline/parsing/xscan.lua":"bd95a1b0b7022d029a41aab615897502478b5834612505e8d299343cb5ca8ef9","scripts/codeoutline/update_sequence.lua":"3e6f9b2707439adb92c6db6aa550c225676ae7de6b9e7f20bf897bbbf07e0b57","scripts/codeoutline/analysis/cpp/cpp_bindings.lua":"06adeb3b4a56d97555b6e4bd775de8dd1c9d2331474b670d53188d4fbe4b3b0c","scripts/codeoutline/updater.lua":"267c4b6e9704fce710f44d1bfceac69c1857e34e064d8444d7890f0e10d921c7","scripts/codeoutline/analysis/csharp/csharp_bindings.lua":"722c8fb2b133bbe09179293b068967fe70e7a2e8942380068a04a97b1283a43d","scripts/codeoutline/shared/text.lua":"56ee63c7b4cc63fe12d8ecd5b99410281463cdba8ca112f484e402ca6dfc5b90","scripts/codeoutline/runtime/idle_gc.lua":"2025b037b593b5e19714b6e283c8a0490146e591de795988a543a161277714f1","scripts/codeoutline/lang/go.lua":"027afb44a9c3a92aa74b9af230d8571963183697529fd41fe915ffa831f3e8da","licenses/lua-cmsgpack.txt":"8edfdc5282278a1268d8a6ee52f9245f1a5fe3d1c8065be00330196b1de49873","scripts/codeoutline/analysis/cpp/cpp_implementations.lua":"87d637812626672f44226e245f94d675e209a83e4cd2d6b2a320ed9d60a6a3d0","scripts/codeoutline/install/agent_config.lua":"041e1736f7be060b9eac9f3ced0b20f50854d94af2cddfa22c5d3868f3fc1681","scripts/codeoutline/analysis/dispatch_aliases.lua":"05f3b06d7d890089b8e18a2e849df9a5ec433bce5312a22d80b7be417e614373","scripts/codeoutline/protocol/http.lua":"bd558939df95e4a908551f43ca5bf0eb68d7a16b8eb20b1b4076a5ece20956b7","scripts/codeoutline/analysis/indirect.lua":"38e15056251400f840604af29fb3ddacac7915d2cf1c2bf7870d481497cc8831","licenses/mbedtls.txt":"9b405ef4c89342f5eae1dd828882f931747f71001cfba7d114801039b52ad09b","scripts/codeoutline/analysis/cpp/cpp_includes.lua":"7a2de73f528a608eb89aea0f5fe8d18b3ef51d6e9966106af0ecd41f03304d07","scripts/codeoutline/install/agent_install.lua":"32409b49dd1e8436169f334587b4994c9d6868ed3ff5c4eaed09b4b3b8ca12c4","scripts/codeoutline/analysis/foreign.lua":"4c8fdbe398f2b43be861ce0e4915916956c1fb2af6c10c5c04a9654e8aac2bf2","scripts/codeoutline/protocol/lsp.lua":"f236c0407dc8b479c883cd526a19dca61efd999926e70d564d299c3972074224","keys/update-ca.crt":"45b509a584e187fdedb666f2d8df9039f36e6bde86170b2426e583721ff42b42","scripts/codeoutline/runtime/parse_worker.lua":"4cb620924fbe43d0f9a411c689060575220c0b2947d09fba266fe552ad003cfe","scripts/codeoutline/install/daemon.lua":"06863991135cc9a85f07bca8310296f0df9e415b3e2de97ae006393e777b009b","scripts/codeoutline/runtime/update_worker.lua":"9557e5207e440fccf15e8255b3fb1c8933ad33d1f352c19987fb825f7db45706","scripts/codeoutline/analysis/function_values.lua":"d10bc4a2a82a90a611daf3c2bb26c41da43543f7831711bd4b0c311ad5569d80","scripts/codeoutline/query/type_references.lua":"9119a2c55b2ae825190ac50d97d6a4cacacd33a707cd1e98b532c4a7d02e4a0c","licenses/libdeflate.txt":"41b60f2caab6bffdd5ba360687bd23ca653c0a1235c00380ecffc939b4cd8d75","scripts/codeoutline/install/editor_install.lua":"a69f5e123f7fbdb58fe2da691c744c0668a11ccd88f17a98167038c80a5d4cff","scripts/codeoutline/service.lua":"795797bf7d3b329e67fff5b3d8bd9ab2681dfb2472f7d9a8236756bea67c0c56","scripts/codeoutline/protocol/mcp.lua":"1e65df410d6cede3cc0fb227ea406a5e7e178d425b5ed861f73d8b748fbdbae7","scripts/codeoutline/analysis/rust/rust_resolution.lua":"2b9ec789243cda63107a721e8d907faa3d3d5c18f21a69b634db4deac9e586ee","scripts/codeoutline/analysis/lua/lua_bindings.lua":"8fa65c14a7da95ec2d3ded2484807481123216af05c9ba8c70c929d4d4b0490d","scripts/codeoutline/install/install_prompt.lua":"588c90cd2955756b13a96e1f0d17145a51eda239c9cf179d5eac195532ee9f49","scripts/codeoutline/query/coverage.lua":"3a4a0e5f5ea8b7ea4a0be62c7c1a202153cf0c5c3423f78b100aecbb39513d5e","scripts/codeoutline/protocol/lsp_trace.lua":"41e6e67866eb6c862cf11337a637a94505f62a29533a9dbd6226d3b801444597","scripts/codeoutline/analysis/lua/foreign_lua.lua":"c217da78314febeff5d20c9d7e9f68e25089d1e76f4350405d83af494deac3dc","scripts/codeoutline/analysis/go/go_frameworks.lua":"2f2a692a6dbda384abf32af0750bb40e99f1bc3e83f039215f0eaf750cf77f65","scripts/codeoutline/analysis/lua/lua_callback_loops.lua":"2b28f338ebc23c8a6543fad61e932ceaee409512b69a71711d385fcc0bdafd4c","scripts/codeoutline/analysis/ordinary_bindings.lua":"ec9f3609650f2ec05dd429e178118a4dded9b6c40cfecdd5efcdeb5e0bb2ad94","scripts/codeoutline/analysis/rust/rust_packages.lua":"c6886a77017bf039499d93027b28bd354599875a5d3705f622ea3366512432e8","scripts/codeoutline/shared/control.lua":"b67a2e382e021f0793ef313aa4e71faab76f6cb77ca127f499d01ae96f36a8db","scripts/codeoutline/analysis/lua/lua_literal.lua":"5fdd90a872988622337410c7e516d41b789ce4326c4aa6dddcd61998fe5aef90","scripts/codeoutline/analysis/static_dispatch.lua":"9940f4c4317e8f5345a9f39178fac639278bc186265a72369f1be808bdeebd29","scripts/codeoutline/analysis/go/go_methods.lua":"71832a6b8941a6b6f9155c59cec2da7c33108a132608cdaa2cd85076c4e241cf","scripts/codeoutline/analysis/shared_events.lua":"88fb64d66e6d41da3beeaeff86f6357b5a8ceae16003ba194aaa01171e4874f1","scripts/codeoutline/lang/csharp.lua":"93762ccefd326fb04fcc5c5dd73821241216e9374de2abbe9e4f53fe5af1c160","scripts/codeoutline/shared/path.lua":"407bd960c1ad04e5006b321ce33263393bb40eee5dee5c123be9b36d3ad10937","scripts/codeoutline/indexing/cpp_fragments.lua":"6be4c3f89c234b6982235981d9f128875790acd5d22f80fe11290bb99af903a3","scripts/codeoutline/analysis/type_bases.lua":"470fdcfffc3ded8bd3c9608db6128539757c91692bc714173dbb1bcdf8344e36","scripts/codeoutline/analysis/go/go_modules.lua":"432dc66435fe93fbc2a7d1aa4212ae03ad5454effd18ffb3e06c2eca6a169aab","scripts/codeoutline/lang/c.lua":"f341d250a09a937d8548657991bdeac0aec8de26b7d056292709126ee999c6f1","scripts/codeoutline/shared/rules.lua":"d2a6ead429ead37d491c7eacdbcc9fa6579fcd1a7749af1345050938f0c1b5a8"},"updateSequence":28,"runtimeBuild":"4f732f99896571583bf36c62f9e00127fdffe245f43bacd27ee38e08d9cd1298"}
|
package/editors/codeoutline.vsix
CHANGED
|
Binary file
|
|
Binary file
|
package/keys/update-ca.crt
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
MIIDTjCCAjagAwIBAgIUGk0p4hd1nhA01S7DyxwhvrKrcBYwDQYJKoZIhvcNAQEL
|
|
3
|
+
BQAwGTEXMBUGA1UEAwwONDMuMTMzLjI1NS4xOTMwIBcNMjYxMTEzMTI1NjE4WhgP
|
|
4
|
+
OTk5OTEyMzEyMzU5NTlaMBkxFzAVBgNVBAMMDjQzLjEzMy4yNTUuMTkzMIIBIjAN
|
|
5
|
+
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA+iDzjNyMlP5W/ZQptT2H8YjBnMEx
|
|
6
|
+
A/in6+C5sAufazsMBu9LS+UrHQgbdDA/hsPeeXLOt4ZGKydhyVXfXz9NYa0ZS/5c
|
|
7
|
+
fdTFNKXlRefdF4ibupLKU3asM6oqNHMujNSTVqfhShD8lary00nN3K8Y30z4KD5a
|
|
8
|
+
8UrUuSJM6OMqejtDqU+LGKBwiWRZ/vXixXQz3BgFgPvNghKKJg5Jq/cOnZiM9E6W
|
|
9
|
+
5mGNzmZCi8cACRlSuzdKby74rvgfdPAVv8gykyYsVxOCxe6k90qefdt7jbDjCsBC
|
|
10
|
+
7jHceLa2XjFEmEXrVewbHeBpdcAzb6t+MfsielpJj5dR/jkbf7tQlDVzDwIDAQAB
|
|
11
|
+
o4GLMIGIMB0GA1UdDgQWBBQ7OO+fdOewuqJg3L3vIKT4UUL05DAfBgNVHSMEGDAW
|
|
12
|
+
gBQ7OO+fdOewuqJg3L3vIKT4UUL05DAPBgNVHRMBAf8EBTADAQH/MCAGA1UdEQQZ
|
|
13
|
+
MBeHBCuF/8GHBH8AAAGCCWxvY2FsaG9zdDATBgNVHSUEDDAKBggrBgEFBQcDATAN
|
|
14
|
+
BgkqhkiG9w0BAQsFAAOCAQEA9rJh7+tmZPjBUY40bVr2aZlB+fVf2jhklwlAuv/Q
|
|
15
|
+
PW4LF79D/m7Ml4C30mJfMp2/mdTs5G4JuwIkIb42ji8J8mu1wMRvwMEsGz+NU4GN
|
|
16
|
+
bNrIaYXmbVRvMqF3CWyRSBt+xeyY6eAZeCelHic5UtuhHPun0+1fH9ePe+2mTLAu
|
|
17
|
+
VUAkJQC+QbSVuTqSPmHjczSeJznBGdG4vOw2+j7iadRBoba6i0l8UVgU0tXri7l/
|
|
18
|
+
KBhGAvx52pvS8CQilalsqXqqdyDvbX3F8v7kfQjqvKgBDLKSGyNi0DS3gvVqNGen
|
|
19
|
+
Cx/lLdo5hWX3vxlvIdr7keQv7AtDUlc3CEdVF09JgbMqjg==
|
|
20
20
|
-----END CERTIFICATE-----
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"
|
|
1
|
+
{"repository":{"url":"git+https://github.com/1dao/codeoutline.git","type":"git"},"version":"0.3.9","os":["win32"],"name":"@codua/codeoutline-win32-x64","publishConfig":{"access":"public"},"description":"CodeOutline native runtime and Lua implementation for win32-x64","cpu":["x64","arm64"],"license":"BSD-2-Clause","files":["bin/","lib/","keys/","scripts/","editors/","licenses/","LICENSE","codeoutline","codeoutline.cmd","build-info.json","*.md"]}
|
|
@@ -294,7 +294,7 @@ end
|
|
|
294
294
|
|
|
295
295
|
-- owner: the innermost class of src_id, passed in by resolve_ref when the
|
|
296
296
|
-- ref kind needs it (computed once per ref, not per candidate).
|
|
297
|
-
local function score(G, f,
|
|
297
|
+
local function score(G, f, ref_kind, cid, deps, paired, owner)
|
|
298
298
|
local c = G.nodes[cid]
|
|
299
299
|
local cf = G.node_file[cid]
|
|
300
300
|
if family(G.files[cf].language) ~= family(G.files[f].language) then return nil end
|
|
@@ -302,14 +302,9 @@ local function score(G, f, src_id, ref_kind, recv, cid, deps, paired, owner)
|
|
|
302
302
|
if not s then return nil end
|
|
303
303
|
local kind = c.kind
|
|
304
304
|
if kind == 'prototype' then s = s - 3 end
|
|
305
|
-
if ref_kind == '
|
|
306
|
-
-- obj.name() on an unknown receiver: binding it to any same-named
|
|
307
|
-
-- method project-wide (str.format -> some format()) is mostly wrong,
|
|
308
|
-
-- so only local candidates qualify.
|
|
309
|
-
return nil
|
|
310
|
-
elseif ref_kind == 'call' and (G.files[f].language == 'java' or G.files[f].language == 'kotlin') and src_id then
|
|
305
|
+
if ref_kind == 'call' and owner then
|
|
311
306
|
-- unqualified call inside a class: implicit this
|
|
312
|
-
if
|
|
307
|
+
if c.parent and G.id_of[cf][c.parent] == owner then s = s + 30 end
|
|
313
308
|
end
|
|
314
309
|
return s
|
|
315
310
|
end
|
|
@@ -385,8 +380,8 @@ local function resolve_ref(G, f, src_id, name, kind, recv, deps, paired, accept,
|
|
|
385
380
|
for _, id in ipairs(exact) do if accept[G.nodes[id].kind] then result[#result + 1] = id end end
|
|
386
381
|
return result, #result == 0 and (binding_reason or 'binding target unresolved') or strategy, macro_state
|
|
387
382
|
end
|
|
388
|
-
if
|
|
389
|
-
return {}, '
|
|
383
|
+
if kind == 'member_call' then
|
|
384
|
+
return {}, 'receiver binding unresolved', macro_state
|
|
390
385
|
end
|
|
391
386
|
local cands = G.by_name[name]
|
|
392
387
|
if G.files[f].language == 'kotlin' and not recv then
|
|
@@ -410,18 +405,14 @@ local function resolve_ref(G, f, src_id, name, kind, recv, deps, paired, accept,
|
|
|
410
405
|
-- `work`, after which the Python def was filtered out too.)
|
|
411
406
|
local owner = (kind == 'call' and src_id and (G.files[f].language == 'java' or G.files[f].language == 'kotlin'))
|
|
412
407
|
and owner_class(G, src_id) or nil
|
|
413
|
-
-- score() rejects an unknown-receiver member call to an unrelated file;
|
|
414
|
-
-- checking placement first skips most candidates of common method names.
|
|
415
|
-
local local_only = kind == 'member_call'
|
|
416
408
|
local n, has_def, has_name = 0, false, false
|
|
417
409
|
for i = 1, math.min(#cands, M.MAX_CANDIDATES) do
|
|
418
410
|
local cid = cands[i]
|
|
419
411
|
local node = G.nodes[cid]
|
|
420
412
|
if cid ~= src_id and accept[node.kind]
|
|
421
413
|
and (G.files[f].language ~= 'lua' or not node['local'] or G.node_file[cid] == f
|
|
422
|
-
or lua_bindings.exported(node, name, G.lua_global_export_tables))
|
|
423
|
-
|
|
424
|
-
local s = score(G, f, src_id, kind, recv, cid, deps, paired, owner)
|
|
414
|
+
or lua_bindings.exported(node, name, G.lua_global_export_tables)) then
|
|
415
|
+
local s = score(G, f, kind, cid, deps, paired, owner)
|
|
425
416
|
if s then
|
|
426
417
|
n = n + 1
|
|
427
418
|
scored_ids[n], scored_vals[n] = cid, s
|
|
@@ -550,6 +541,7 @@ function M.add_file(G, rel, rec)
|
|
|
550
541
|
ids[n] = id
|
|
551
542
|
insert(G, G.by_name, node.name, id, node_before)
|
|
552
543
|
for _, alias in ipairs(lua_bindings.aliases(node, G.lua_global_export_tables)) do insert(G, G.by_name, alias, id, node_before) end
|
|
544
|
+
for _, alias in ipairs(lua_bindings.member_aliases(node)) do insert(G, G.by_name, alias, id, node_before) end
|
|
553
545
|
insert(G, G.by_lname, node.name:lower(), id, node_before)
|
|
554
546
|
insert(G, G.by_qualified, node.qualified, id, node_before)
|
|
555
547
|
local owner = M.owner(node.qualified)
|
|
@@ -568,6 +560,7 @@ function M.remove_file(G, rel)
|
|
|
568
560
|
local node = G.nodes[id]
|
|
569
561
|
remove(G, G.by_name, node.name, id, node_before)
|
|
570
562
|
for _, alias in ipairs(lua_bindings.aliases(node, G.lua_global_export_tables)) do remove(G, G.by_name, alias, id, node_before) end
|
|
563
|
+
for _, alias in ipairs(lua_bindings.member_aliases(node)) do remove(G, G.by_name, alias, id, node_before) end
|
|
571
564
|
remove(G, G.by_lname, node.name:lower(), id, node_before)
|
|
572
565
|
remove(G, G.by_qualified, node.qualified, id, node_before)
|
|
573
566
|
local owner = M.owner(node.qualified)
|
|
@@ -3,6 +3,7 @@ local M = {}
|
|
|
3
3
|
local control = require('codeoutline.shared.control')
|
|
4
4
|
local loaders = { require = true, dofile = true, loadfile = true }
|
|
5
5
|
local EXPORT_OWNER = '__exports'
|
|
6
|
+
local EMPTY = {}
|
|
6
7
|
-- Loader call at token j: a known loader name, or any dotted/plain name whose
|
|
7
8
|
-- last segment ends in `import` (`ks.import`, `skynet_import`). Returns the
|
|
8
9
|
-- kind recorded in lua_imports, the callee's last token, and the base name
|
|
@@ -41,6 +42,37 @@ local function binding_at(bindings, name, token)
|
|
|
41
42
|
return best
|
|
42
43
|
end
|
|
43
44
|
|
|
45
|
+
-- A nil-initialized local can receive a module in a sibling if block. Keep
|
|
46
|
+
-- possible imports at later uses, and stop on a write we cannot model. Only the
|
|
47
|
+
-- last write of each branch survives; sibling branches keep their source order.
|
|
48
|
+
local function conditional_hint(bindings, name, base, token, T, offset)
|
|
49
|
+
if not base or not base.nil_local then return nil end
|
|
50
|
+
local writes = bindings[name]
|
|
51
|
+
if #writes > 32 then return nil end
|
|
52
|
+
local branches, last, seen = {}, {}, {}
|
|
53
|
+
for _, write in ipairs(writes) do
|
|
54
|
+
local finished = token and write.b < token or offset and T.e[write.b] <= offset
|
|
55
|
+
if base.token < write.token and finished then
|
|
56
|
+
if write.assignment then
|
|
57
|
+
if not write.branch or write.outer ~= base.a then return nil end
|
|
58
|
+
local arm = write.arm or write.a
|
|
59
|
+
if not seen[arm] then seen[arm], branches[#branches + 1] = true, arm end
|
|
60
|
+
last[arm] = write
|
|
61
|
+
elseif write.if_local and write.outer == base.a then
|
|
62
|
+
-- Branch-local declarations can hide a different variable.
|
|
63
|
+
return nil
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
local imports = {}
|
|
68
|
+
for _, scope in ipairs(branches) do
|
|
69
|
+
local import = last[scope].branch_import
|
|
70
|
+
if import then imports[#imports + 1] = import end
|
|
71
|
+
end
|
|
72
|
+
if #imports == 1 then return 'lua:' .. imports[1] end
|
|
73
|
+
if #imports > 1 then return 'lua-conditional:' .. table.concat(imports, ',') end
|
|
74
|
+
end
|
|
75
|
+
|
|
44
76
|
local function metatable_import(T, bindings, bound)
|
|
45
77
|
if not bound then return nil end
|
|
46
78
|
local call = bound.token + 2
|
|
@@ -59,6 +91,11 @@ local function metatable_import(T, bindings, bound)
|
|
|
59
91
|
return base and tonumber(base.hint:match('^lua:(%d+)$'))
|
|
60
92
|
end
|
|
61
93
|
|
|
94
|
+
local function declared_local(T, params, token)
|
|
95
|
+
return T:text(token - 1) == 'local' or params[token] ~= nil
|
|
96
|
+
or T:text(token - 1) == 'function' and T:text(token - 2) == 'local'
|
|
97
|
+
end
|
|
98
|
+
|
|
62
99
|
-- Shared lexical table-member lookup for normal references and query-only
|
|
63
100
|
-- configured callback aliases. Results are local parser node indices.
|
|
64
101
|
function M.local_members(nodes, scopes, name, token, scope, finish)
|
|
@@ -76,6 +113,9 @@ function M.collect(r, T, bm)
|
|
|
76
113
|
r.lua_imports, r.lua_exports, r.lua_locals = {}, {}, {}
|
|
77
114
|
local details = not r.defer_analysis and (r.ranges or r.ordinary_bindings)
|
|
78
115
|
local scopes, stack, params, bindings, function_scopes = {}, {}, {}, {}, {}
|
|
116
|
+
-- Query-only: `then`/`else` do not open a block, so every arm of one `if`
|
|
117
|
+
-- shares its scope. Arm openings tell sequential writes from alternatives.
|
|
118
|
+
local arms = {}
|
|
79
119
|
for i = 1, T.n do
|
|
80
120
|
if stack[#stack] and bm[stack[#stack]] == i then stack[#stack] = nil end
|
|
81
121
|
scopes[i] = stack[#stack] or 0
|
|
@@ -83,13 +123,21 @@ function M.collect(r, T, bm)
|
|
|
83
123
|
function_scopes[i] = T:text(i) == 'function' or function_scopes[scopes[i]]
|
|
84
124
|
stack[#stack + 1] = i
|
|
85
125
|
end
|
|
126
|
+
if details and T.k[i] == 'kw' then
|
|
127
|
+
local text = T:text(i)
|
|
128
|
+
if text == 'then' or text == 'else' then
|
|
129
|
+
local list = arms[scopes[i]]
|
|
130
|
+
if not list then list = {}; arms[scopes[i]] = list end
|
|
131
|
+
list[#list + 1] = i
|
|
132
|
+
end
|
|
133
|
+
end
|
|
86
134
|
if T:text(i) == 'function' and T.k[i] == 'kw' then
|
|
87
135
|
local p = i + 1
|
|
88
136
|
while p < (bm[i] or i) and T:text(p) ~= '(' do p = p + 1 end
|
|
89
137
|
for j = p + 1, (T.m[p] or p) - 1 do if T.k[j] == 'id' then params[j] = i end end
|
|
90
138
|
end
|
|
91
139
|
end
|
|
92
|
-
local function add(name, token, scope, hint, imported)
|
|
140
|
+
local function add(name, token, scope, hint, imported, finish)
|
|
93
141
|
bindings[name] = bindings[name] or {}
|
|
94
142
|
-- Reassignment/parameter shadowing must not revive a global name
|
|
95
143
|
-- after a loader value was bound under this lexical name.
|
|
@@ -98,7 +146,31 @@ function M.collect(r, T, bm)
|
|
|
98
146
|
if b.imported and b.token < token and b.a <= token and b.b >= token then imported = true end
|
|
99
147
|
end
|
|
100
148
|
end
|
|
101
|
-
|
|
149
|
+
local binding = { token = token, a = scope, b = bm[scope] or T.n, hint = hint, imported = imported }
|
|
150
|
+
bindings[name][#bindings[name] + 1] = binding
|
|
151
|
+
if details then
|
|
152
|
+
local local_decl = T:text(token - 1) == 'local'
|
|
153
|
+
local next = T:text(token + 1)
|
|
154
|
+
binding.local_declaration = declared_local(T, params, token)
|
|
155
|
+
binding.nil_local = local_decl and (next == '=' and T:text(token + 2) == 'nil' and value_end(T, token + 3)
|
|
156
|
+
or next ~= '=' and next ~= ',' and (T.k[token + 1] ~= 'op' or next == ';'))
|
|
157
|
+
binding.assignment = not local_decl and not params[token] and next == '='
|
|
158
|
+
if T:text(scope) == 'if' then
|
|
159
|
+
binding.outer = scopes[scope]
|
|
160
|
+
binding.if_local = local_decl or T:text(token - 2) == 'local' and T:text(token - 1) == 'function'
|
|
161
|
+
local index = hint:match('^lua:(%d+)$')
|
|
162
|
+
local last = index and finish or T:text(token + 2) == 'nil' and token + 2
|
|
163
|
+
-- Any top-level write in the branch counts; the scope check
|
|
164
|
+
-- already excludes writes nested in a deeper block.
|
|
165
|
+
if binding.assignment and last and value_end(T, last + 1) then
|
|
166
|
+
binding.branch = true
|
|
167
|
+
binding.branch_import = index
|
|
168
|
+
for _, opening in ipairs(arms[scope] or EMPTY) do
|
|
169
|
+
if opening < token then binding.arm = opening else break end
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
102
174
|
end
|
|
103
175
|
for i = 1, T.n do
|
|
104
176
|
if i % 4096 == 0 then control.check() end
|
|
@@ -109,7 +181,7 @@ function M.collect(r, T, bm)
|
|
|
109
181
|
elseif prev == 'local' or (next == '=' and prev ~= '.' and prev ~= ':' and prev ~= '{' and prev ~= ',') then
|
|
110
182
|
local hint = '?'
|
|
111
183
|
if next == '=' and T:text(i + 2) == '{' then hint = 'lua-local:' .. T:text(i) end
|
|
112
|
-
local kind, call, base
|
|
184
|
+
local kind, call, base, finish
|
|
113
185
|
if next == '=' then kind, call, base = loader_call(T, i + 2) end
|
|
114
186
|
local imported = kind ~= nil
|
|
115
187
|
if kind then
|
|
@@ -130,6 +202,7 @@ function M.collect(r, T, bm)
|
|
|
130
202
|
r.lua_imports[#r.lua_imports + 1] = { path = path, kind = kind,
|
|
131
203
|
member = member and T:text(member) or nil }
|
|
132
204
|
hint = (member and 'lua-value:' or 'lua:') .. #r.lua_imports
|
|
205
|
+
finish = close
|
|
133
206
|
if kind == 'loadfile' then hint = '?' end
|
|
134
207
|
if member and kind ~= 'loadfile' then
|
|
135
208
|
r.refs[#r.refs + 1] = { tok = member, name = T:text(member), kind = 'ref',
|
|
@@ -140,7 +213,7 @@ function M.collect(r, T, bm)
|
|
|
140
213
|
end
|
|
141
214
|
end
|
|
142
215
|
-- Keep ordinary local function/table lookup; block unknown imported receivers.
|
|
143
|
-
add(T:text(i), i, scopes[i], hint, imported)
|
|
216
|
+
add(T:text(i), i, scopes[i], hint, imported, finish)
|
|
144
217
|
end
|
|
145
218
|
end
|
|
146
219
|
end
|
|
@@ -233,7 +306,8 @@ function M.collect(r, T, bm)
|
|
|
233
306
|
local best = binding_at(bindings, ref.recv or ref.name, ref.tok)
|
|
234
307
|
if best and (ref.recv or best.imported) then
|
|
235
308
|
local value = best.hint:match('^lua%-value:')
|
|
236
|
-
|
|
309
|
+
local hint = ref.recv and conditional_hint(bindings, ref.recv, best, ref.tok) or best.hint
|
|
310
|
+
ref.lua_binding = value and (not ref.recv and hint or '?') or (ref.recv and hint or '?')
|
|
237
311
|
end
|
|
238
312
|
if ref.recv == 'self' and not best then ref.lua_binding = '?' end
|
|
239
313
|
if ref.recv and (T:text(ref.tok - 3) == '.' or T:text(ref.tok - 3) == ':') then ref.lua_binding = '?' end
|
|
@@ -270,20 +344,31 @@ function M.collect(r, T, bm)
|
|
|
270
344
|
end
|
|
271
345
|
end
|
|
272
346
|
end
|
|
347
|
+
-- Only a local declaration or parameter hides a project-wide table name.
|
|
348
|
+
-- `Logger = {}` is a global assignment, so its members stay global aliases.
|
|
349
|
+
local function local_owner(name, token)
|
|
350
|
+
local list = bindings[name]
|
|
351
|
+
if not list then return false end
|
|
352
|
+
for _, b in ipairs(list) do
|
|
353
|
+
if b.token <= token and b.a <= token and b.b >= token
|
|
354
|
+
and declared_local(T, params, b.token) then return true end
|
|
355
|
+
end
|
|
356
|
+
return false
|
|
357
|
+
end
|
|
273
358
|
-- A global alias is a statement of its own: the right-hand side is a bare
|
|
274
359
|
-- identifier and nothing but a separator follows it on that line. The key
|
|
275
360
|
-- is dotted (`g_exports.name`) or a literal (`g_exports['name']`).
|
|
276
361
|
local globals, definitions = {}, {}
|
|
277
362
|
for index, n in ipairs(r.nodes) do
|
|
278
363
|
local owner, key = n.qualified:match('^([%a_][%w_]*)[.:]([%a_][%w_]*)$')
|
|
279
|
-
if owner and not
|
|
364
|
+
if owner and not local_owner(owner, n.ti) and not n.parent and (n.kind == 'function' or n.kind == 'method') then
|
|
280
365
|
definitions[n.ti] = { owner = owner, key = key, index = index }
|
|
281
366
|
end
|
|
282
367
|
end
|
|
283
368
|
for i = 1, T.n - 4 do
|
|
284
369
|
if i % 4096 == 0 then control.check() end
|
|
285
370
|
local owner = T:text(i)
|
|
286
|
-
if T.k[i] == 'id' and not
|
|
371
|
+
if T.k[i] == 'id' and not local_owner(owner, i) and T:text(i - 1) ~= '.' and T:text(i - 1) ~= ':' then
|
|
287
372
|
local key, eq
|
|
288
373
|
if T:text(i + 1) == '.' and T.k[i + 2] == 'id' then key, eq = T:text(i + 2), i + 3
|
|
289
374
|
elseif T:text(i + 1) == '[' and T.m[i + 1] == i + 3 and T.k[i + 2] == 'str' then key, eq = literal(T, i + 2), i + 4 end
|
|
@@ -467,7 +552,6 @@ function M.context(G)
|
|
|
467
552
|
return ctx
|
|
468
553
|
end
|
|
469
554
|
-- Project-selected aliases share the normal name index and overlay path.
|
|
470
|
-
local EMPTY = {}
|
|
471
555
|
function M.aliases(node, owners)
|
|
472
556
|
if not node.lua_aliases then return EMPTY end
|
|
473
557
|
local names, seen = {}, {}
|
|
@@ -487,6 +571,29 @@ function M.exported(node, name, owners)
|
|
|
487
571
|
end
|
|
488
572
|
return false
|
|
489
573
|
end
|
|
574
|
+
-- A member alias is only nameable through its owner (`Logger.es`), so it never
|
|
575
|
+
-- publishes the bare key. Direct definitions already carry the dotted name.
|
|
576
|
+
function M.member_aliases(node)
|
|
577
|
+
if not node.lua_aliases then return EMPTY end
|
|
578
|
+
local names, seen = {}, {}
|
|
579
|
+
for owner, keys in pairs(node.lua_aliases) do
|
|
580
|
+
for _, name in ipairs(keys) do
|
|
581
|
+
local qualified = owner .. '.' .. name
|
|
582
|
+
if name ~= node.name and not seen[qualified] then
|
|
583
|
+
names[#names + 1], seen[qualified] = qualified, true
|
|
584
|
+
end
|
|
585
|
+
end
|
|
586
|
+
end
|
|
587
|
+
table.sort(names)
|
|
588
|
+
return names
|
|
589
|
+
end
|
|
590
|
+
function M.member_alias(node, qualified)
|
|
591
|
+
if not node.lua_aliases or not qualified then return false end
|
|
592
|
+
local owner, name = qualified:match('^([%a_][%w_]*)%.([%a_][%w_]*)$')
|
|
593
|
+
if not owner then return false end
|
|
594
|
+
for _, alias in ipairs(node.lua_aliases[owner] or EMPTY) do if alias == name then return true end end
|
|
595
|
+
return false
|
|
596
|
+
end
|
|
490
597
|
function M.modules(G, imp, ctx)
|
|
491
598
|
ctx = ctx or M.context(G)
|
|
492
599
|
local key = imp.kind .. '\0' .. imp.path
|
|
@@ -536,13 +643,50 @@ function M.native_modules(G, name, ctx)
|
|
|
536
643
|
return require('codeoutline.analysis.foreign').modules(G, 'lua', name, ctx)
|
|
537
644
|
end
|
|
538
645
|
|
|
646
|
+
function M.has_local_receiver(T, name, offset)
|
|
647
|
+
for _, binding in ipairs((T.lua_bindings or EMPTY)[name] or EMPTY) do
|
|
648
|
+
if binding.local_declaration and T.s[binding.token] - 1 <= offset
|
|
649
|
+
and (binding.a == 0 or offset < T.e[binding.b]) then return true end
|
|
650
|
+
end
|
|
651
|
+
return false
|
|
652
|
+
end
|
|
653
|
+
|
|
539
654
|
-- Shared query-time receiver resolution for completion and navigation. Reuse
|
|
540
655
|
-- the parser's lexical bindings and loader contracts; never execute Lua.
|
|
541
656
|
local function module_target(G, imp, ctx)
|
|
542
657
|
return { modules = M.modules(G, imp, ctx), module_name = imp.path }
|
|
543
658
|
end
|
|
544
659
|
|
|
660
|
+
local function imported_target(G, rec, hint, ctx)
|
|
661
|
+
local index = tonumber(hint:match('^lua:(%d+)$'))
|
|
662
|
+
if index then
|
|
663
|
+
local imp = (rec.lua_imports or EMPTY)[index]
|
|
664
|
+
return imp and module_target(G, imp, ctx)
|
|
665
|
+
end
|
|
666
|
+
local branches = hint:match('^lua%-conditional:([%d,]+)$')
|
|
667
|
+
if not branches then return nil end
|
|
668
|
+
local alternatives, seen = {}, {}
|
|
669
|
+
for i in branches:gmatch('%d+') do
|
|
670
|
+
local imp = rec.lua_imports[tonumber(i)]
|
|
671
|
+
local key = imp.kind .. '\0' .. imp.path
|
|
672
|
+
if not seen[key] then
|
|
673
|
+
seen[key] = true
|
|
674
|
+
alternatives[#alternatives + 1] = module_target(G, imp, ctx)
|
|
675
|
+
end
|
|
676
|
+
end
|
|
677
|
+
return { alternatives = alternatives }
|
|
678
|
+
end
|
|
679
|
+
|
|
545
680
|
function M.member(G, target, name)
|
|
681
|
+
if target and target.alternatives then
|
|
682
|
+
local result, seen = {}, {}
|
|
683
|
+
for _, alternative in ipairs(target.alternatives) do
|
|
684
|
+
for _, entry in ipairs(M.member(G, alternative, name)) do
|
|
685
|
+
if not seen[entry.node] then seen[entry.node] = true; result[#result + 1] = entry end
|
|
686
|
+
end
|
|
687
|
+
end
|
|
688
|
+
return result
|
|
689
|
+
end
|
|
546
690
|
local result = {}
|
|
547
691
|
for _, f in ipairs(target and target.modules or {}) do
|
|
548
692
|
local rec = G.files[f]
|
|
@@ -579,11 +723,9 @@ function M.receiver(G, rec, T, name, offset, ctx, depth)
|
|
|
579
723
|
target.lua_self = best.self_info
|
|
580
724
|
return target, true
|
|
581
725
|
end
|
|
582
|
-
local
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
return module_target(G, imp, ctx), true
|
|
586
|
-
end
|
|
726
|
+
local hint = conditional_hint(T.lua_bindings, name, best, nil, T, offset) or best.hint
|
|
727
|
+
local imported = imported_target(G, rec, hint, ctx)
|
|
728
|
+
if imported then return imported, true end
|
|
587
729
|
local i = best.token + 2
|
|
588
730
|
if best.imported or T:text(best.token + 1) ~= '=' or T.k[i] ~= 'id' then return nil, true end
|
|
589
731
|
local target = M.receiver(G, rec, T, T:text(i), T.s[best.token] - 1, ctx, depth + 1)
|
|
@@ -642,16 +784,17 @@ function M.resolve(G, f, name, hint, ctx, recv)
|
|
|
642
784
|
return n and { G.id_of[f][n] } or {}
|
|
643
785
|
end
|
|
644
786
|
local value = tonumber(hint:match('^lua%-value:(%d+)$'))
|
|
645
|
-
local
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
787
|
+
local rec = G.files[f]
|
|
788
|
+
if value then
|
|
789
|
+
local imp = (rec.lua_imports or EMPTY)[value]
|
|
790
|
+
if not imp then return nil end
|
|
791
|
+
name, hint = imp.member, 'lua:' .. value
|
|
792
|
+
end
|
|
793
|
+
local target = imported_target(G, rec, hint, ctx)
|
|
794
|
+
if not target then return nil end
|
|
649
795
|
local result = {}
|
|
650
|
-
for _,
|
|
651
|
-
|
|
652
|
-
local exports = require('codeoutline.analysis.foreign').exports(rec, 'lua', imp.path) or rec.lua_exports
|
|
653
|
-
local n = (exports or {})[name]
|
|
654
|
-
if n then result[#result + 1] = G.id_of[target][n] end
|
|
796
|
+
for _, entry in ipairs(M.member(G, target, name)) do
|
|
797
|
+
result[#result + 1] = G.id_of[entry.file][entry.index]
|
|
655
798
|
end
|
|
656
799
|
return result
|
|
657
800
|
end
|