brainstorm: code topic to support advanced definition search #9839
Unanswered
dna2github
asked this question in
Code Search and Navigation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks for the awesome work for code search!
what is a
topic
?topic
to describe how the 2 repos are connected. for example, MicroService 1 running a restful API server and provide "/api/v1/test"; MicroService 2 calls the API using HTTP lib; then atopic
can bemicroservice2|customer_oriented_act()
->mircorservice2|call_request_to_api_v1_test
->microservice1|register_api_v1_test
->microservice1|handle_api_v1_test
; i can name the topic likehow does SystemA deal with a customer request of specific action
why need
topic
?topic
is a concept for people learning and it can become a knowledge base. for example, i would like to learn how openssl integrate with a repo to think about if we can replace openssl with gnu tls lib in the repo; when we have such data, we can search in natural language likehow does docker create a container
->... syscall clone() ...
(topic
->code()
)topic
can support more accurate definition search; for example, almost IDE implementGo to definition
in Java, when it meets an interface usage, it redirects user to the interface instead of tracking data flow and redirecting user to the real implementation. another example; in C/C++ we have macro token concatenation and we can define#define func(x) func_##x
, how we can reversely find func_hello definition to the macro usage offunc(hello)
? in i18n area, the search is also helpful: inen.strings
string.hello=hello
;sp.strings
string.hello=ola
;cn.strings
string.hello=你好
; and in code<button>{{string.hello}}</button>
; how we can connect the strings and the usages? in summary, it is helpful forcode()
->topic
; e.g.func_hello
->func(hello)
->func_hello is a function
topic
--code()
->doc
; then we can easily know how the function works or how we design it ...definitely, i know there is a similar issue: #8593
but it does not resolve the real
advanced definition
even we use LSP or LSIF. machine learning may help, but currently NLP is at baby stage.tech challenge:
Beta Was this translation helpful? Give feedback.
All reactions