Revert multi-profile (#4812)

* Revert "multi-profile follow up. (#4802)"

This reverts commit 2b2ed470c1.

* Revert "multi profile (#4532)"

This reverts commit 04e586d07b.

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest-8-cores)

* Re-run CI after snapshots

* Re-run CI after snapshots

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest-8-cores)

* Re-run CI after snapshots

* Add `fixme` to onboarding test

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Frank Noirot
2024-12-16 10:34:11 -05:00
committed by GitHub
parent 49de3b0ac9
commit efe8089b08
63 changed files with 1278 additions and 3588 deletions

View File

@ -70,14 +70,10 @@ export async function applyConstraintLength({
}: {
length: KclCommandValue
selectionRanges: Selections
}): Promise<{
modifiedAst: Program
pathToNodeMap: PathToNodeMap
exprInsertIndex: number
}> {
}) {
const ast = kclManager.ast
const angleLength = angleLengthInfo({ selectionRanges })
if (err(angleLength)) return Promise.reject(angleLength)
if (err(angleLength)) return angleLength
const { transforms } = angleLength
let distanceExpression: Expr = length.valueAst
@ -98,7 +94,7 @@ export async function applyConstraintLength({
}
if (!isExprBinaryPart(distanceExpression)) {
return Promise.reject('Invalid valueNode, is not a BinaryPart')
return new Error('Invalid valueNode, is not a BinaryPart')
}
const retval = transformAstSketchLines({
@ -116,12 +112,6 @@ export async function applyConstraintLength({
return {
modifiedAst: _modifiedAst,
pathToNodeMap,
exprInsertIndex:
'variableName' in length &&
length.variableName &&
length.insertIndex !== undefined
? length.insertIndex
: -1,
}
}
@ -134,7 +124,6 @@ export async function applyConstraintAngleLength({
}): Promise<{
modifiedAst: Program
pathToNodeMap: PathToNodeMap
exprInsertIndex: number
}> {
const angleLength = angleLengthInfo({ selectionRanges, angleOrLength })
if (err(angleLength)) return Promise.reject(angleLength)
@ -219,6 +208,5 @@ export async function applyConstraintAngleLength({
return {
modifiedAst: _modifiedAst,
pathToNodeMap,
exprInsertIndex: variableName ? newVariableInsertIndex : -1,
}
}