forked from kcl-lang/kcl
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] main from kcl-lang:main #1
Merged
Merged
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
* enhance lsp diags. Change the return type of function `compile_with_params` from Result<(Program, IndexSet<Diagnostic>, GlobalState)> to (IndexSet<Diagnostic>, Result<(Program, GlobalState)>)). Returns the discovered diags when compilation fails. Signed-off-by: he1pa <[email protected]> * fmt code Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
Signed-off-by: peefy <[email protected]>
…d for the dependency update (#1375) Signed-off-by: peefy <[email protected]>
fix: fix lsp goto def of system pkg. refactor some unit test Signed-off-by: he1pa <[email protected]>
Signed-off-by: peefy <[email protected]>
Signed-off-by: peefy <[email protected]>
refactor: refactor lsp newline complete. Use gs scope kind replace program ast to judge whether in schema expr' Signed-off-by: he1pa <[email protected]>
* feat: enhance upgrade dict to schema. handle union type of dict which value is scheam * remove `emit_error` in type_check Signed-off-by: he1pa <[email protected]> * fix empty dict Signed-off-by: he1pa <[email protected]> * fix ut absolute path Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
Signed-off-by: peefy <[email protected]>
Signed-off-by: peefy <[email protected]>
* Refractored lambda_local_var_test Signed-off-by: Wck-iipi <[email protected]> * Refractored goto_def_test with snapshot testing Signed-off-by: Wck-iipi <[email protected]> * Fixed goto_local_var_def_tests Signed-off-by: Wck-iipi <[email protected]> --------- Signed-off-by: Wck-iipi <[email protected]>
* feat: api list_variables supports get variables from multi-files Signed-off-by: zongz <[email protected]> * fix: fix CR comments Signed-off-by: zongz <[email protected]> * fix: fix test cases Signed-off-by: zongz <[email protected]> --------- Signed-off-by: zongz <[email protected]>
feat: advanced resolver incremental compile. 1. Namer and Advanced Resolver support incremental compilation, clear cache by pkg and only update new pkg 2. Add gs cache in lsp state 3. Namer and Advanced Resolver modify gs in place(&mut) to reduce clone Signed-off-by: he1pa <[email protected]>
…#1386) * feat: added FunctionSymbol Signed-off-by: shruti2522 <[email protected]> fmt check Signed-off-by: shruti2522 <[email protected]> feat: added FunctionSymbol Signed-off-by: shruti2522 <[email protected]> fmt check Signed-off-by: shruti2522 <[email protected]> feat: added FunctionSymbol Signed-off-by: shruti2522 <[email protected]> add function symbol kind to lsp Signed-off-by: shruti2522 <[email protected]> update function symbol def Signed-off-by: shruti2522 <[email protected]> fmt check Signed-off-by: shruti2522 <[email protected]> fix ci Signed-off-by: shruti2522 <[email protected]> fix ci Signed-off-by: shruti2522 <[email protected]> feat: added FunctionSymbol Signed-off-by: shruti2522 <[email protected]> add tests to sema_token Signed-off-by: shruti2522 <[email protected]> add get_function_symbol Signed-off-by: shruti2522 <[email protected]> highlight for func call Signed-off-by: shruti2522 <[email protected]> fmt check Signed-off-by: shruti2522 <[email protected]> fmt check Signed-off-by: shruti2522 <[email protected]> modify walk_call_expr Signed-off-by: shruti2522 <[email protected]> update namer for func_name Signed-off-by: shruti2522 <[email protected]> feat: distinguish highlight for func symbol and normal var symbol Signed-off-by: shruti2522 <[email protected]> update alloc_function_symbol Signed-off-by: shruti2522 <[email protected]> function symbol for builtin functions Signed-off-by: shruti2522 <[email protected]> update function symbol def Signed-off-by: shruti2522 <[email protected]> delete test.log Signed-off-by: shruti2522 <[email protected]> remove func symbol from walk_call_expr Signed-off-by: shruti2522 <[email protected]> update walk_call_expr for namer Signed-off-by: shruti2522 <[email protected]> update sema test Signed-off-by: shruti2522 <[email protected]> feat: added FunctionSymbol Signed-off-by: shruti2522 <[email protected]> add function symbol kind in global state Signed-off-by: shruti2522 <[email protected]> update hover to handle func symbolkind Signed-off-by: shruti2522 <[email protected]> add condition for symbolkind in hover Signed-off-by: shruti2522 <[email protected]> fmt check Signed-off-by: shruti2522 <[email protected]> remove print statements Signed-off-by: shruti2522 <[email protected]> update loader snapshots Signed-off-by: shruti2522 <[email protected]> fix advanced resolver Signed-off-by: shruti2522 <[email protected]> feat: added FunctionSymbol Signed-off-by: shruti2522 <[email protected]> update assign stmt for lambda expr Signed-off-by: shruti2522 <[email protected]> update resolve_names for identifier_expr Signed-off-by: shruti2522 <[email protected]> update semantic tokens with function type Signed-off-by: shruti2522 <[email protected]> feat: api list_variables supports get variables from multi-files (#1389) * feat: api list_variables supports get variables from multi-files Signed-off-by: zongz <[email protected]> * fix: fix CR comments Signed-off-by: zongz <[email protected]> * fix: fix test cases Signed-off-by: zongz <[email protected]> --------- Signed-off-by: zongz <[email protected]> feat: advance resolver incremental compile (#1209) feat: advanced resolver incremental compile. 1. Namer and Advanced Resolver support incremental compilation, clear cache by pkg and only update new pkg 2. Add gs cache in lsp state 3. Namer and Advanced Resolver modify gs in place(&mut) to reduce clone Signed-off-by: he1pa <[email protected]> feat: added FunctionSymbol Signed-off-by: shruti2522 <[email protected]> resolve conflicts Signed-off-by: shruti2522 <[email protected]> resolve conflicts Signed-off-by: shruti2522 <[email protected]> feat: added FunctionSymbol Signed-off-by: shruti2522 <[email protected]> resolve conflicts Signed-off-by: shruti2522 <[email protected]> remove duplicate code Signed-off-by: shruti2522 <[email protected]> fmt check Signed-off-by: shruti2522 <[email protected]> remove repititions Signed-off-by: shruti2522 <[email protected]> fmt check Signed-off-by: shruti2522 <[email protected]> feat: added FunctionSymbol Signed-off-by: shruti2522 <[email protected]> * remove unwanted changes in global_state Signed-off-by: shruti2522 <[email protected]> remove unwanted changes in global_state Signed-off-by: shruti2522 <[email protected]> * fmt check Signed-off-by: shruti2522 <[email protected]> --------- Signed-off-by: shruti2522 <[email protected]>
Signed-off-by: he1pa <[email protected]>
Signed-off-by: peefy <[email protected]>
remove incorrect code Signed-off-by: he1pa <[email protected]>
Signed-off-by: Peefy <[email protected]>
Signed-off-by: peefy <[email protected]>
* feat: add completion item for string union types Signed-off-by: shruti2522 <[email protected]> * feat: add completion items for string_union_types Signed-off-by: shruti2522 <[email protected]> * remove unwanted code Signed-off-by: shruti2522 <[email protected]> * conditional completion for str and str lit Signed-off-by: shruti2522 <[email protected]> * add symbol complete items for string lit type Signed-off-by: shruti2522 <[email protected]> make fmt Signed-off-by: shruti2522 <[email protected]> add symbol complete items for string lit type Signed-off-by: shruti2522 <[email protected]> * make fmt Signed-off-by: shruti2522 <[email protected]> * conditional attrs for union types Signed-off-by: shruti2522 <[email protected]> make fmt Signed-off-by: shruti2522 <[email protected]> conditional attrs for union types Signed-off-by: shruti2522 <[email protected]> * add return value for union type to get_type_symbol Signed-off-by: shruti2522 <[email protected]> --------- Signed-off-by: shruti2522 <[email protected]>
add completion tests for string union types make fmt add comments add completion tests for string union types update comment add completion tests for string union types Signed-off-by: shruti2522 <[email protected]>
Signed-off-by: peefy <[email protected]>
* feat: automatic configuration merging is supported in ListVariables api Signed-off-by: zongz <[email protected]> * fix: add fmt for ListVariable api return code Signed-off-by: zongz <[email protected]> * fix: make fmt Signed-off-by: zongz <[email protected]> * fix: add more test cases Signed-off-by: zongz <[email protected]> * fix: rm useless comments Signed-off-by: zongz <[email protected]> --------- Signed-off-by: zongz <[email protected]>
#1419) feat: upgrade dict to schema for function parameters and return values Signed-off-by: he1pa <[email protected]>
Signed-off-by: he1pa <[email protected]>
* fix: allow setting PROTOC environment variable * fix: allow setting PROTOC environment variable
Signed-off-by: he1pa <[email protected]>
Signed-off-by: peefy <[email protected]>
Signed-off-by: Lan Liang <[email protected]>
Signed-off-by: peefy <[email protected]>
* fix: fix lsp parse cache. compile with vfs source code which not in main pkg Signed-off-by: he1pa <[email protected]> * fix ut Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
* feat: program.pkg HashMap<String, Vec<Module>> -> HashMap<String, Vec<Arc<Module>>> . Reduce the performance loss of module ast clone Signed-off-by: he1pa <[email protected]> * feat: use Arc<RwLock<Module>> in program to reduce deep copy when compiling Signed-off-by: he1pa <[email protected]> * fix deep clone in evaluator Signed-off-by: he1pa <[email protected]> * s/get_mut_module/get_module_mut Signed-off-by: he1pa <[email protected]> * Refactor some duplicate code Signed-off-by: he1pa <[email protected]> * replace std::Result with anyhow::Result Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
perf: Optimizing parser performance Signed-off-by: he1pa <[email protected]>
Signed-off-by: peefy <[email protected]>
Signed-off-by: peefy <[email protected]>
Signed-off-by: peefy <[email protected]>
* feat: lsp file watcher. Actively monitor file system changes. These changes will not be notified through lsp, e.g., execute `kcl mod add xxx`, `kcl fmt xxx` Signed-off-by: he1pa <[email protected]> * s/FsEventWatcher/RecommendedWatcher Signed-off-by: he1pa <[email protected]> * add lsp watcher ut Signed-off-by: he1pa <[email protected]> * fix typo Signed-off-by: he1pa <[email protected]> * fix ut Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
Signed-off-by: peefy <[email protected]>
#1749) feat: Add a function to parse all kcl files in the given path and opts. Different from load_program, this function will compile files that are not imported. Signed-off-by: he1pa <[email protected]>
fix: fix complete schema pkg name error. And optimize the cursor position after completion Signed-off-by: he1pa <[email protected]>
* feat: lsp hint for config entry key type Signed-off-by: he1pa <[email protected]> * update ut snapshot Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
Signed-off-by: peefy <[email protected]>
feat: add new api to get all schema under path Signed-off-by: he1pa <[email protected]>
* feat: lsp complete for unimport schemas. Apply the new api load_all_files_under_paths to lsp, complete the unimport schemas, and complete the corresponding import schema_pkg Signed-off-by: he1pa <[email protected]> * remove debug code Signed-off-by: he1pa <[email protected]> * Merge duplicate completion items Signed-off-by: he1pa <[email protected]> * only complete in root scope Signed-off-by: he1pa <[email protected]> * move some test data file Signed-off-by: he1pa <[email protected]> * filter schema in resolver, instead of advanced resolver. Do not analyze unimported pkg in AdvancedResolver to avoid extra performance loss Signed-off-by: he1pa <[email protected]> * add ut Signed-off-by: he1pa <[email protected]> * fix windows ut Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
* musl build for Alpine Linux Signed-off-by: utnim2 <[email protected]> * fixed the path name Signed-off-by: utnim2 <[email protected]> --------- Signed-off-by: utnim2 <[email protected]>
* feat: add service api GetSchemaTypeMappingUnderPath Signed-off-by: he1pa <[email protected]> * fix typo Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
Signed-off-by: zongz <[email protected]>
Signed-off-by: zongz <[email protected]>
* fix: fix lsp watcher. remove feature, wait for `kcl mod metadata` to read only Signed-off-by: he1pa <[email protected]> * add arg `--update` for `kcl mod metadata` Signed-off-by: he1pa <[email protected]> * fix: fix native mod metadata Signed-off-by: zongz <[email protected]> * fix: make fmt Signed-off-by: zongz <[email protected]> * fix: rm git submodule Signed-off-by: zongz <[email protected]> * fix: rm git submodule Signed-off-by: zongz <[email protected]> * fix: rm git submodules Signed-off-by: zongz <[email protected]> --------- Signed-off-by: he1pa <[email protected]> Signed-off-by: zongz <[email protected]> Co-authored-by: zongz <[email protected]>
fix func kcl_alloc. Init ptr value when alloc Signed-off-by: he1pa <[email protected]>
Signed-off-by: zongz <[email protected]>
feat: Add some restrictions in load_all_files_under_paths to prevent performance issues Signed-off-by: he1pa <[email protected]>
Signed-off-by: he1pa <[email protected]>
Signed-off-by: Sumitwarrior7 <[email protected]>
Signed-off-by: Peefy <[email protected]>
* feat: add chars method for builtin str Signed-off-by: Zejun Zhao <[email protected]> * fix ut Signed-off-by: he1pa <[email protected]> * add unicode ut for chars() Signed-off-by: he1pa <[email protected]> * fix ut Signed-off-by: He1pa <[email protected]> --------- Signed-off-by: Zejun Zhao <[email protected]> Signed-off-by: he1pa <[email protected]> Signed-off-by: He1pa <[email protected]> Co-authored-by: he1pa <[email protected]>
* fix: fix hidden global vars when merge in evaluator Signed-off-by: he1pa <[email protected]> * add ut Signed-off-by: he1pa <[email protected]> * fix `show_hidden` Signed-off-by: he1pa <[email protected]> * fmt Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
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.
See Commits and Changes for more details.
Created by pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )