Skip to content

Commit

Permalink
feat: added mkdir and delete module functions
Browse files Browse the repository at this point in the history
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 (#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>
  • Loading branch information
shruti2522 committed May 4, 2024
1 parent 5f8ccd3 commit b4ef566
Show file tree
Hide file tree
Showing 22 changed files with 231 additions and 117 deletions.
6 changes: 3 additions & 3 deletions kclvm/api/src/service/service_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ impl KclvmServiceImpl {
/// assert_eq!(result.type_errors.len(), 0);
/// assert_eq!(result.symbols.len(), 12);
/// assert_eq!(result.scopes.len(), 3);
/// assert_eq!(result.node_symbol_map.len(), 169);
/// assert_eq!(result.symbol_node_map.len(), 169);
/// assert_eq!(result.fully_qualified_name_map.len(), 178);
/// assert_eq!(result.node_symbol_map.len(), 171);
/// assert_eq!(result.symbol_node_map.len(), 171);
/// assert_eq!(result.fully_qualified_name_map.len(), 180);
/// assert_eq!(result.pkg_scope_map.len(), 3);
/// ```
#[inline]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 157,
index: 159,
generation: 0,
},
kind: Value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 157,
index: 159,
generation: 0,
},
kind: Value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 157,
index: 159,
generation: 0,
},
kind: Value,
Expand Down
30 changes: 15 additions & 15 deletions kclvm/loader/src/snapshots/kclvm_loader__tests__builtin_call_0.snap
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,6 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
),
attrs: [
SymbolRef {
id: Index {
index: 128,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 129,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 130,
Expand Down Expand Up @@ -291,6 +277,20 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
kind: Value,
},
SymbolRef {
id: Index {
index: 157,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 158,
generation: 0,
},
kind: Value,
},
],
is_global: false,
},
Expand Down Expand Up @@ -330,4 +330,4 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
attrs: [],
is_global: false,
},
]
]
92 changes: 46 additions & 46 deletions kclvm/loader/src/snapshots/kclvm_loader__tests__builtin_call_1.snap
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 157,
index: 159,
generation: 0,
},
kind: Value,
Expand Down Expand Up @@ -180,20 +180,6 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
),
attrs: [
SymbolRef {
id: Index {
index: 128,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 129,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 130,
Expand Down Expand Up @@ -383,6 +369,20 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
kind: Value,
},
SymbolRef {
id: Index {
index: 157,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 158,
generation: 0,
},
kind: Value,
},
],
is_global: false,
},
Expand Down Expand Up @@ -415,27 +415,13 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 158,
index: 160,
generation: 0,
},
kind: Value,
},
),
attrs: [
SymbolRef {
id: Index {
index: 128,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 129,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 130,
Expand Down Expand Up @@ -625,6 +611,20 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
kind: Value,
},
SymbolRef {
id: Index {
index: 157,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 158,
generation: 0,
},
kind: Value,
},
],
is_global: false,
},
Expand Down Expand Up @@ -664,20 +664,6 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
),
attrs: [
SymbolRef {
id: Index {
index: 128,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 129,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 130,
Expand Down Expand Up @@ -867,6 +853,20 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
},
kind: Value,
},
SymbolRef {
id: Index {
index: 157,
generation: 0,
},
kind: Value,
},
SymbolRef {
id: Index {
index: 158,
generation: 0,
},
kind: Value,
},
],
is_global: false,
},
Expand Down Expand Up @@ -899,7 +899,7 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
def: Some(
SymbolRef {
id: Index {
index: 159,
index: 161,
generation: 0,
},
kind: Value,
Expand Down Expand Up @@ -982,4 +982,4 @@ expression: "format!(\"{:#?}\", p.symbols.values())"
attrs: [],
is_global: false,
},
]
]
Loading

0 comments on commit b4ef566

Please sign in to comment.