Fix patterning in module to not fail when importing function from the module (#6082)

* Add failing test

* Update output to show execution error

* Fix circular pattern to not error in isolated or mock mode

* Update output after fix

* Add failing test for pattern linear 2D

* Add failing output

* Fix isolated execution in linear patterns

* Update output after linear fix
This commit is contained in:
Jonathan Tran
2025-03-31 19:46:29 -04:00
committed by GitHub
parent 566143757f
commit bb4ed59191
24 changed files with 2492 additions and 9 deletions

View File

@ -0,0 +1,89 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing pattern_linear_in_module.kcl
---
{
"Ok": {
"body": [
{
"commentStart": 0,
"end": 0,
"path": {
"type": "Kcl",
"filename": "thing.kcl"
},
"selector": {
"type": "List",
"items": [
{
"alias": null,
"commentStart": 7,
"end": 0,
"name": {
"commentStart": 7,
"end": 0,
"name": "thing",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ImportItem"
}
]
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 29,
"end": 0,
"expression": {
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 31,
"end": 0,
"name": {
"commentStart": 31,
"end": 0,
"name": "thing",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 31,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
}
],
"commentStart": 0,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"0": [
{
"commentStart": 29,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"startNodes": []
},
"start": 0
}
}