-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat: add file.mkdir and file.delete functions #1271
Conversation
7fa580b
to
d1cb43b
Compare
A reference PR to add more functions for the file module. #1157 |
Ah, got it now. While going through the issue, I supposed them to be cli functions, that's why I made changes to the cli. |
Pull Request Test Coverage Report for Build 8951702386Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
143f196
to
a37fe21
Compare
Ready for review @Peefy |
Could you please add more tests and code for the resolver like this PR #1157 |
4cdf55f
to
24673ce
Compare
added the tests @Peefy, please have a look |
@@ -1638,6 +1638,34 @@ register_file_member! { | |||
false, | |||
None, | |||
) | |||
mkdir => Type::function( | |||
None, | |||
Type::str_ref(), |
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 type?
) | ||
delete => Type::function( | ||
None, | ||
Type::str_ref(), |
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 type?
@@ -0,0 +1 @@ | |||
delete: 'failed to delete 'test_dir': No such file or directory' |
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 can add the stderr test suite.
Signed-off-by: shruti2522 <shruti.apc01@gmail.com> corrected formatting Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated formatting Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated linker.rs feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com> format checking Signed-off-by: shruti2522 <shruti.apc01@gmail.com> `get_schema_type` function will now return `SchemaType` instances with base schema information included (kcl-lang#1272) * `get_schema_type` and `get_full_schema_type` will now return `SchemaType` instance Signed-off-by: utnim2 <mintugogoi567@gmail.com> * added the recursive function Signed-off-by: utnim2 <mintugogoi567@gmail.com> * fixed the types Signed-off-by: utnim2 <mintugogoi567@gmail.com> --------- Signed-off-by: utnim2 <mintugogoi567@gmail.com> feat: extend file module functions mkdir and delete Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com> tests added Signed-off-by: shruti2522 <shruti.apc01@gmail.com> tests updated Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated test cases Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated kclvm loader snaps Signed-off-by: shruti2522 <shruti.apc01@gmail.com> added stderr output Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com>
856216e
to
b4ef566
Compare
made the changes @Peefy |
Signed-off-by: shruti2522 <shruti.apc01@gmail.com>
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.
LGTM
* feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com> corrected formatting Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated formatting Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated linker.rs feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com> format checking Signed-off-by: shruti2522 <shruti.apc01@gmail.com> `get_schema_type` function will now return `SchemaType` instances with base schema information included (kcl-lang#1272) * `get_schema_type` and `get_full_schema_type` will now return `SchemaType` instance Signed-off-by: utnim2 <mintugogoi567@gmail.com> * added the recursive function Signed-off-by: utnim2 <mintugogoi567@gmail.com> * fixed the types Signed-off-by: utnim2 <mintugogoi567@gmail.com> --------- Signed-off-by: utnim2 <mintugogoi567@gmail.com> feat: extend file module functions mkdir and delete Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com> tests added Signed-off-by: shruti2522 <shruti.apc01@gmail.com> tests updated Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated test cases Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated kclvm loader snaps Signed-off-by: shruti2522 <shruti.apc01@gmail.com> added stderr output Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: added mkdir and delete module functions Signed-off-by: shruti2522 <shruti.apc01@gmail.com> * updated stdout Signed-off-by: shruti2522 <shruti.apc01@gmail.com> --------- Signed-off-by: shruti2522 <shruti.apc01@gmail.com> Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>
1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):
fix Extend file module functions (for smoother GitOps) #1267
2. What is the scope of this PR (e.g. component or file name):
kcl-lang/kcl/kclvm
3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):
Added
kclvm_mkdir
andkclvm_delete
module functions.4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):
5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links: