Compare commits

...

4 Commits

Author SHA1 Message Date
90276f94de Enable KCL logging in cargo test CI check 2025-01-03 17:18:14 -05:00
1c941112d7 Remove draft PR filter on e2e tests (#4908) 2025-01-03 16:14:51 -05:00
6f1d718097 Add parsing keyword function calls inside pipelines (#4907)
Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
2025-01-03 19:56:23 +00:00
36957237c0 Louder Windows codesign errors (#4762)
* WIP: Silent failure in signWin.js
Fixes #4582

* Temp: force release build

* Fake throw

* Temp: another test

* Clean up for merge
2025-01-03 17:52:55 +00:00
6 changed files with 90 additions and 8 deletions

View File

@ -50,6 +50,7 @@ jobs:
env:
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
RUST_MIN_STACK: 10485760000
ZOO_LOG: '1'
- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:

View File

@ -18,7 +18,6 @@ permissions:
jobs:
check-rust-changes:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
outputs:
rust-changed: ${{ steps.filter.outputs.rust }}
@ -35,7 +34,6 @@ jobs:
- 'src/wasm-lib/**'
electron:
if: github.event.pull_request.draft == false
timeout-minutes: 60
name: playwright:electron:${{ matrix.os }} ${{ matrix.shardIndex }} ${{ matrix.shardTotal }}
strategy:

View File

@ -38,7 +38,7 @@ win:
# - arm64
signingHashAlgorithms:
- sha256
sign: "./sign-win.js"
sign: "./scripts/sign-win.js"
publisherName: "KittyCAD Inc" # needs to be exactly like on Digicert
icon: "assets/icon.ico"
fileAssociations:

View File

@ -24,8 +24,7 @@ exports.default = async (configuration) => {
try {
execSync(
`smctl sign --fingerprint="${
process.env.WINDOWS_CERTIFICATE_THUMBPRINT
`smctl sign --fingerprint="${process.env.WINDOWS_CERTIFICATE_THUMBPRINT
}" --input "${String(configuration.path)}"`,
{
stdio: 'inherit',
@ -33,6 +32,6 @@ exports.default = async (configuration) => {
)
console.log('Signing using signWin.js script: successful')
} catch (error) {
console.error('Signing using signWin.js script: failed:', error)
throw new Error('Signing using signWin.js script: failed:', error)
}
}

View File

@ -2568,9 +2568,17 @@ fn typecheck(spec_arg: &crate::docs::StdLibFnArg, arg: &&Expr) -> PResult<()> {
Ok(())
}
/// Either a positional or keyword function call.
fn fn_call_pos_or_kw(i: &mut TokenSlice) -> PResult<Expr> {
alt((
fn_call.map(Box::new).map(Expr::CallExpression),
fn_call_kw.map(Box::new).map(Expr::CallExpressionKw),
))
.parse_next(i)
}
fn labelled_fn_call(i: &mut TokenSlice) -> PResult<Expr> {
let call = fn_call.parse_next(i)?;
let expr = Expr::CallExpression(Box::new(call));
let expr = fn_call_pos_or_kw.parse_next(i)?;
let label = opt(label).parse_next(i)?;
match label {
@ -4654,6 +4662,7 @@ my14 = 4 ^ 2 - 3 ^ 2 * 2
kw_function_decl_with_default_and_type,
r#"fn foo(x?: number = 2) { return 1 }"#
);
snapshot_test!(kw_function_call_in_pipe, r#"val = 1 |> f(arg = x)"#);
}
#[allow(unused)]

View File

@ -0,0 +1,75 @@
---
source: kcl/src/parsing/parser.rs
assertion_line: 4674
expression: actual
snapshot_kind: text
---
{
"body": [
{
"declaration": {
"end": 21,
"id": {
"end": 3,
"name": "val",
"start": 0,
"type": "Identifier"
},
"init": {
"body": [
{
"end": 7,
"raw": "1",
"start": 6,
"type": "Literal",
"type": "Literal",
"value": 1.0
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"type": "Identifier",
"name": "arg"
},
"arg": {
"end": 20,
"name": "x",
"start": 19,
"type": "Identifier",
"type": "Identifier"
}
}
],
"callee": {
"end": 12,
"name": "f",
"start": 11,
"type": "Identifier"
},
"end": 21,
"start": 11,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 21,
"start": 6,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "VariableDeclarator"
},
"end": 21,
"kind": "const",
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"end": 21,
"start": 0
}