Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
cba953c245 | |||
54ca6ea0b2 | |||
6a01608c3a | |||
530f15e04a | |||
725e59d987 | |||
54313c9b03 | |||
890d96496c | |||
35999366a7 | |||
2affc7271d | |||
d30fbf8b4b | |||
3f7e776464 | |||
79cff57f43 | |||
1cd2cd82b2 |
37
.github/ISSUE_TEMPLATE/cryptic_error.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: Cryptic KCL Error
|
||||||
|
description: File a bug report for source code that produces a confusing error
|
||||||
|
title: "[CRYPTIC]: "
|
||||||
|
labels: ["cryptic-error"]
|
||||||
|
assignees: []
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: "Thank you for taking the time to report a confusing error. Please provide as much information as possible to help us resolve it."
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: kcl
|
||||||
|
attributes:
|
||||||
|
label: Paste minimal KCL source that produces a cryptic error
|
||||||
|
description: Minimal KCL reproducer that produces a cryptic error
|
||||||
|
placeholder: "const ..."
|
||||||
|
render: javascript
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: expected-behavior
|
||||||
|
attributes:
|
||||||
|
label: Expected Behavior
|
||||||
|
description: Description of what you expected to happen (if you know).
|
||||||
|
placeholder: "I expected that..."
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: additional-context
|
||||||
|
attributes:
|
||||||
|
label: Additional Context
|
||||||
|
description: Add any other context about the problem here.
|
||||||
|
placeholder: "Anything else you want to add..."
|
||||||
|
validations:
|
||||||
|
required: false
|
37
README.md
@ -124,28 +124,39 @@ Before you submit a contribution PR to this repo, please ensure that:
|
|||||||
|
|
||||||
## Release a new version
|
## Release a new version
|
||||||
|
|
||||||
1. Bump the versions by running `./make-realease.sh` while on a fresh pull of main
|
#### 1. Bump the versions by running `./make-release.sh` and create a Cut Release PR
|
||||||
|
|
||||||
That will create the branch with the updated json files for you.
|
That will create the branch with the updated json files for you:
|
||||||
run `./make-release.sh` for a patch update
|
- run `./make-release.sh` or `./make-release.sh patch` for a patch update;
|
||||||
run `./make-release.sh "minor"` for minor
|
- run `./make-release.sh minor` for minor; or
|
||||||
run `./make-release.sh "major"` for major
|
- run `./make-release.sh major` for major.
|
||||||
|
|
||||||
After it runs you should just need to push the push the branch and open a PR (it will suggest a changelog for you too, delete any that are not user facing)
|
After it runs you should just need the push the branch and open a PR.
|
||||||
|
|
||||||
The PR may serve as a place to discuss the human-readable changelog and extra QA.
|
**Important:** It needs to be prefixed with `Cut release v` to build in release mode and a few other things to test in the best context possible, the intent would be for instance to have `Cut release v1.2.3` for the `v1.2.3` release candidate.
|
||||||
|
|
||||||
2. Smoke test the artifact from the above PR
|
The PR may then serve as a place to discuss the human-readable changelog and extra QA. The `make-release.sh` tool suggests a changelog for you too to be used as PR description, just make sure to delete lines that are not user facing.
|
||||||
We don't have a strict process, but click around and check for anything obvious
|
|
||||||
One of the artifacts is called updater-test, because we don't have a way to test this fully automated, we have a semi-automated process.
|
|
||||||
|
|
||||||
Download updater-test zip file, install the app, run it, expect an updater prompt to v0.99.99, install it and check that the app comes back at that version (on both macOS and Windows).
|
#### 2. Smoke test artifacts from the Cut Release PR
|
||||||
|
|
||||||
3. Merge the PR
|
The release builds can be find under the `artifact` zip, at the very bottom of the `ci` action page for each commit on this branch.
|
||||||
|
|
||||||
|
We don't have a strict process, but click around and check for anything obvious, posting results as comments in the Cut Release PR.
|
||||||
|
|
||||||
|
The other `ci` output in Cut Release PRs is `updater-test`, because we don't have a way to test this fully automated, we have a semi-automated process. Download updater-test zip file, install the app, run it, expect an updater prompt to a dummy v0.99.99, install it and check that the app comes back at that version (on both macOS and Windows).
|
||||||
|
|
||||||
|
#### 3. Merge the Cut Release PR
|
||||||
|
|
||||||
|
This will kick the `create-release` action, that creates a _Draft_ release out of this Cut Release PR merge after less than a minute, with the new version as title and Cut Release PR as description.
|
||||||
|
|
||||||
|
|
||||||
4. Profit (A new Action kicks in at https://github.com/KittyCAD/modeling-app/actions if the PR was correctly named)
|
#### 4. Publish the release
|
||||||
|
|
||||||
|
Head over to https://github.com/KittyCAD/modeling-app/releases, the draft release corresponding to the merged Cut Release PR should show up at the top as _Draft_. Click on it, verify the content, and hit _Publish_.
|
||||||
|
|
||||||
|
#### 5. Profit
|
||||||
|
|
||||||
|
A new Action kicks in at https://github.com/KittyCAD/modeling-app/actions, which can be found under `release` event filter.
|
||||||
|
|
||||||
|
|
||||||
## Fuzzing the parser
|
## Fuzzing the parser
|
||||||
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "untitled-app",
|
"name": "untitled-app",
|
||||||
"version": "0.24.2",
|
"version": "0.24.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/autocomplete": "^6.17.0",
|
"@codemirror/autocomplete": "^6.17.0",
|
||||||
|
@ -80,5 +80,5 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"productName": "Zoo Modeling App",
|
"productName": "Zoo Modeling App",
|
||||||
"version": "0.24.2"
|
"version": "0.24.3"
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ export function App() {
|
|||||||
}, [projectName, projectPath])
|
}, [projectName, projectPath])
|
||||||
|
|
||||||
useHotKeyListener()
|
useHotKeyListener()
|
||||||
const { context } = useModelingContext()
|
const { context, state } = useModelingContext()
|
||||||
|
|
||||||
const { auth, settings } = useSettingsAuthContext()
|
const { auth, settings } = useSettingsAuthContext()
|
||||||
const token = auth?.context?.token
|
const token = auth?.context?.token
|
||||||
@ -57,7 +57,6 @@ export function App() {
|
|||||||
const {
|
const {
|
||||||
app: { onboardingStatus },
|
app: { onboardingStatus },
|
||||||
} = settings.context
|
} = settings.context
|
||||||
const { state } = useModelingContext()
|
|
||||||
|
|
||||||
useHotkeys('backspace', (e) => {
|
useHotkeys('backspace', (e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
@ -131,6 +131,9 @@ export const ModelingMachineProvider = ({
|
|||||||
},
|
},
|
||||||
'sketch exit execute': ({ store }) => {
|
'sketch exit execute': ({ store }) => {
|
||||||
;(async () => {
|
;(async () => {
|
||||||
|
// blocks entering a sketch until after exit sketch code has run
|
||||||
|
kclManager.isExecuting = true
|
||||||
|
|
||||||
await sceneInfra.camControls.snapToPerspectiveBeforeHandingBackControlToEngine()
|
await sceneInfra.camControls.snapToPerspectiveBeforeHandingBackControlToEngine()
|
||||||
|
|
||||||
sceneInfra.camControls.syncDirection = 'engineToClient'
|
sceneInfra.camControls.syncDirection = 'engineToClient'
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import styles from './ModelingPane.module.css'
|
import styles from './ModelingPane.module.css'
|
||||||
import { useSettingsAuthContext } from 'hooks/useSettingsAuthContext'
|
import { useSettingsAuthContext } from 'hooks/useSettingsAuthContext'
|
||||||
import { useModelingContext } from 'hooks/useModelingContext'
|
import { useModelingContext } from 'hooks/useModelingContext'
|
||||||
|
import { ActionButton } from 'components/ActionButton'
|
||||||
|
import Tooltip from 'components/Tooltip'
|
||||||
|
|
||||||
export interface ModelingPaneProps
|
export interface ModelingPaneProps
|
||||||
extends React.PropsWithChildren,
|
extends React.PropsWithChildren,
|
||||||
@ -8,16 +10,32 @@ export interface ModelingPaneProps
|
|||||||
title: string
|
title: string
|
||||||
Menu?: React.ReactNode | React.FC
|
Menu?: React.ReactNode | React.FC
|
||||||
detailsTestId?: string
|
detailsTestId?: string
|
||||||
|
onClose: () => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ModelingPaneHeader = ({
|
export const ModelingPaneHeader = ({
|
||||||
title,
|
title,
|
||||||
Menu,
|
Menu,
|
||||||
}: Pick<ModelingPaneProps, 'title' | 'Menu'>) => {
|
onClose,
|
||||||
|
}: Pick<ModelingPaneProps, 'title' | 'Menu' | 'onClose'>) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
<div className="flex gap-2 items-center flex-1">{title}</div>
|
<div className="flex gap-2 items-center flex-1">{title}</div>
|
||||||
{Menu instanceof Function ? <Menu /> : Menu}
|
{Menu instanceof Function ? <Menu /> : Menu}
|
||||||
|
<ActionButton
|
||||||
|
Element="button"
|
||||||
|
iconStart={{
|
||||||
|
icon: 'close',
|
||||||
|
iconClassName: '!text-current',
|
||||||
|
bgClassName: 'bg-transparent dark:bg-transparent',
|
||||||
|
}}
|
||||||
|
className="!p-0 !bg-transparent hover:text-primary border-transparent dark:!border-transparent hover:!border-primary dark:hover:!border-chalkboard-70 !outline-none"
|
||||||
|
onClick={onClose}
|
||||||
|
>
|
||||||
|
<Tooltip position="bottom-right" delay={750}>
|
||||||
|
Close
|
||||||
|
</Tooltip>
|
||||||
|
</ActionButton>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -29,6 +47,7 @@ export const ModelingPane = ({
|
|||||||
className,
|
className,
|
||||||
Menu,
|
Menu,
|
||||||
detailsTestId,
|
detailsTestId,
|
||||||
|
onClose,
|
||||||
...props
|
...props
|
||||||
}: ModelingPaneProps) => {
|
}: ModelingPaneProps) => {
|
||||||
const { settings } = useSettingsAuthContext()
|
const { settings } = useSettingsAuthContext()
|
||||||
@ -51,7 +70,7 @@ export const ModelingPane = ({
|
|||||||
(className || '')
|
(className || '')
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<ModelingPaneHeader title={title} Menu={Menu} />
|
<ModelingPaneHeader title={title} Menu={Menu} onClose={onClose} />
|
||||||
<div className="relative w-full">{children}</div>
|
<div className="relative w-full">{children}</div>
|
||||||
</section>
|
</section>
|
||||||
)
|
)
|
||||||
|
@ -24,14 +24,12 @@ export const KclEditorMenu = ({ children }: PropsWithChildren) => {
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Menu.Button className="p-0 border-none relative">
|
<Menu.Button className="!p-0 !bg-transparent hover:text-primary border-transparent dark:!border-transparent hover:!border-primary dark:hover:!border-chalkboard-70 ui-open:!border-primary dark:ui-open:!border-chalkboard-70 !outline-none">
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
icon="three-dots"
|
icon="three-dots"
|
||||||
className="p-1"
|
className="p-1"
|
||||||
size="sm"
|
size="sm"
|
||||||
bgClassName={
|
bgClassName="bg-transparent dark:bg-transparent"
|
||||||
'!bg-transparent hover:!bg-primary/10 hover:dark:!bg-chalkboard-100 ui-open:!bg-primary/10 dark:ui-open:!bg-chalkboard-100 rounded-sm'
|
|
||||||
}
|
|
||||||
iconClassName={'!text-chalkboard-90 dark:!text-chalkboard-40'}
|
iconClassName={'!text-chalkboard-90 dark:!text-chalkboard-40'}
|
||||||
/>
|
/>
|
||||||
</Menu.Button>
|
</Menu.Button>
|
||||||
|
@ -204,6 +204,7 @@ function ModelingSidebarSection({
|
|||||||
id={`${pane.id}-pane`}
|
id={`${pane.id}-pane`}
|
||||||
title={pane.title}
|
title={pane.title}
|
||||||
Menu={pane.Menu}
|
Menu={pane.Menu}
|
||||||
|
onClose={() => togglePane(pane.id)}
|
||||||
>
|
>
|
||||||
{pane.Content instanceof Function ? (
|
{pane.Content instanceof Function ? (
|
||||||
<pane.Content />
|
<pane.Content />
|
||||||
|
@ -346,6 +346,7 @@ export class KclManager {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.ast = { ...ast }
|
this.ast = { ...ast }
|
||||||
|
this.isExecuting = true // executeAst sets this to false again
|
||||||
return this.executeAst(ast, zoomToFit)
|
return this.executeAst(ast, zoomToFit)
|
||||||
}
|
}
|
||||||
format() {
|
format() {
|
||||||
|
@ -7,10 +7,15 @@ import {
|
|||||||
Program,
|
Program,
|
||||||
CallExpression,
|
CallExpression,
|
||||||
} from '../wasm'
|
} from '../wasm'
|
||||||
import { addFillet, isTagUsedInFillet } from './addFillet'
|
import {
|
||||||
|
addFillet,
|
||||||
|
hasValidFilletSelection,
|
||||||
|
isTagUsedInFillet,
|
||||||
|
} from './addFillet'
|
||||||
import { getNodeFromPath, getNodePathFromSourceRange } from '../queryAst'
|
import { getNodeFromPath, getNodePathFromSourceRange } from '../queryAst'
|
||||||
import { createLiteral } from 'lang/modifyAst'
|
import { createLiteral } from 'lang/modifyAst'
|
||||||
import { err } from 'lib/trap'
|
import { err } from 'lib/trap'
|
||||||
|
import { Selections } from 'lib/selections'
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await initPromise // Initialize the WASM environment before running tests
|
await initPromise // Initialize the WASM environment before running tests
|
||||||
@ -24,7 +29,7 @@ const runFilletTest = async (
|
|||||||
expectedCode: string
|
expectedCode: string
|
||||||
) => {
|
) => {
|
||||||
const astOrError = parse(code)
|
const astOrError = parse(code)
|
||||||
if (astOrError instanceof Error) {
|
if (err(astOrError)) {
|
||||||
return new Error('AST not found')
|
return new Error('AST not found')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,14 +53,14 @@ const runFilletTest = async (
|
|||||||
ast,
|
ast,
|
||||||
extrudeRange
|
extrudeRange
|
||||||
)
|
)
|
||||||
if (pathToExtrudeNode instanceof Error) {
|
if (err(pathToExtrudeNode)) {
|
||||||
return new Error('Path to extrude node not found')
|
return new Error('Path to extrude node not found')
|
||||||
}
|
}
|
||||||
|
|
||||||
// const radius = createLiteral(5) as Value
|
// const radius = createLiteral(5) as Value
|
||||||
|
|
||||||
const result = addFillet(ast, pathToSegmentNode, pathToExtrudeNode, radius)
|
const result = addFillet(ast, pathToSegmentNode, pathToExtrudeNode, radius)
|
||||||
if (result instanceof Error) {
|
if (err(result)) {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
const { modifiedAst } = result
|
const { modifiedAst } = result
|
||||||
@ -313,3 +318,82 @@ const extrude001 = extrude(-5, sketch001)
|
|||||||
expect(edges).toEqual([])
|
expect(edges).toEqual([])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('Testing button states', () => {
|
||||||
|
const runButtonStateTest = async (
|
||||||
|
code: string,
|
||||||
|
segmentSnippet: string,
|
||||||
|
expectedState: boolean
|
||||||
|
) => {
|
||||||
|
// ast
|
||||||
|
const astOrError = parse(code)
|
||||||
|
if (err(astOrError)) {
|
||||||
|
return new Error('AST not found')
|
||||||
|
}
|
||||||
|
const ast = astOrError as Program
|
||||||
|
|
||||||
|
// selectionRanges
|
||||||
|
const range: [number, number] = segmentSnippet
|
||||||
|
? [
|
||||||
|
code.indexOf(segmentSnippet),
|
||||||
|
code.indexOf(segmentSnippet) + segmentSnippet.length,
|
||||||
|
]
|
||||||
|
: [ast.end, ast.end] // empty line in the end of the code
|
||||||
|
|
||||||
|
const selectionRanges: Selections = {
|
||||||
|
codeBasedSelections: [
|
||||||
|
{
|
||||||
|
range,
|
||||||
|
type: 'default',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
otherSelections: [],
|
||||||
|
}
|
||||||
|
|
||||||
|
// state
|
||||||
|
const buttonState = hasValidFilletSelection({
|
||||||
|
ast,
|
||||||
|
selectionRanges,
|
||||||
|
code,
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(buttonState).toEqual(expectedState)
|
||||||
|
}
|
||||||
|
const codeWithBody: string = `
|
||||||
|
const sketch001 = startSketchOn('XY')
|
||||||
|
|> startProfileAt([-20, -5], %)
|
||||||
|
|> line([0, 10], %)
|
||||||
|
|> line([10, 0], %)
|
||||||
|
|> line([0, -10], %)
|
||||||
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|
|> close(%)
|
||||||
|
const extrude001 = extrude(-10, sketch001)
|
||||||
|
`
|
||||||
|
const codeWithoutBodies: string = `
|
||||||
|
const sketch001 = startSketchOn('XY')
|
||||||
|
|> startProfileAt([-20, -5], %)
|
||||||
|
|> line([0, 10], %)
|
||||||
|
|> line([10, 0], %)
|
||||||
|
|> line([0, -10], %)
|
||||||
|
|> lineTo([profileStartX(%), profileStartY(%)], %)
|
||||||
|
|> close(%)
|
||||||
|
`
|
||||||
|
// body is missing
|
||||||
|
it('should return false when body is missing and nothing is selected', async () => {
|
||||||
|
await runButtonStateTest(codeWithoutBodies, '', false)
|
||||||
|
})
|
||||||
|
it('should return false when body is missing and segment is selected', async () => {
|
||||||
|
await runButtonStateTest(codeWithoutBodies, `line([10, 0], %)`, false)
|
||||||
|
})
|
||||||
|
|
||||||
|
// body exists
|
||||||
|
it('should return true when body exists and nothing is selected', async () => {
|
||||||
|
await runButtonStateTest(codeWithBody, '', true)
|
||||||
|
})
|
||||||
|
it('should return true when body exists and segment is selected', async () => {
|
||||||
|
await runButtonStateTest(codeWithBody, `line([10, 0], %)`, true)
|
||||||
|
})
|
||||||
|
it('hould return false when body exists and not a segment is selected', async () => {
|
||||||
|
await runButtonStateTest(codeWithBody, `close(%)`, false)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
@ -879,8 +879,7 @@ class EngineConnection extends EventTarget {
|
|||||||
.join('\n')
|
.join('\n')
|
||||||
if (message.request_id) {
|
if (message.request_id) {
|
||||||
const artifactThatFailed =
|
const artifactThatFailed =
|
||||||
this.engineCommandManager.artifactMap[message.request_id] ||
|
this.engineCommandManager.artifactMap[message.request_id]
|
||||||
this.engineCommandManager.lastArtifactMap[message.request_id]
|
|
||||||
console.error(
|
console.error(
|
||||||
`Error in response to request ${message.request_id}:\n${errorsString}
|
`Error in response to request ${message.request_id}:\n${errorsString}
|
||||||
failed cmd type was ${artifactThatFailed?.commandType}`
|
failed cmd type was ${artifactThatFailed?.commandType}`
|
||||||
@ -1183,13 +1182,6 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
* of the KCL code that generated it.
|
* of the KCL code that generated it.
|
||||||
*/
|
*/
|
||||||
artifactMap: ArtifactMap = {}
|
artifactMap: ArtifactMap = {}
|
||||||
/**
|
|
||||||
* The {@link ArtifactMap} from the previous engine connection. This is used as a fallback
|
|
||||||
* when the engine connection is reset without a full client-side refresh.
|
|
||||||
*
|
|
||||||
* @deprecated This was used during a short time when we were choosing to not execute the engine in certain cases.
|
|
||||||
*/
|
|
||||||
lastArtifactMap: ArtifactMap = {}
|
|
||||||
/**
|
/**
|
||||||
* The client-side representation of the scene command artifacts that have been sent to the server;
|
* The client-side representation of the scene command artifacts that have been sent to the server;
|
||||||
* that is, the *non-modeling* commands and corresponding artifacts.
|
* that is, the *non-modeling* commands and corresponding artifacts.
|
||||||
@ -1593,10 +1585,7 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
type: 'receive-reliable',
|
type: 'receive-reliable',
|
||||||
data: message,
|
data: message,
|
||||||
id,
|
id,
|
||||||
cmd_type:
|
cmd_type: command?.commandType || sceneCommand?.commandType,
|
||||||
command?.commandType ||
|
|
||||||
this.lastArtifactMap[id]?.commandType ||
|
|
||||||
sceneCommand?.commandType,
|
|
||||||
})
|
})
|
||||||
Object.values(this.subscriptions[modelingResponse.type] || {}).forEach(
|
Object.values(this.subscriptions[modelingResponse.type] || {}).forEach(
|
||||||
(callback) => callback(modelingResponse)
|
(callback) => callback(modelingResponse)
|
||||||
@ -1778,7 +1767,6 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async startNewSession() {
|
async startNewSession() {
|
||||||
this.lastArtifactMap = this.artifactMap
|
|
||||||
this.artifactMap = {}
|
this.artifactMap = {}
|
||||||
await this.initPlanes()
|
await this.initPlanes()
|
||||||
}
|
}
|
||||||
|
6
src/wasm-lib/Cargo.lock
generated
@ -1385,7 +1385,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "kcl-lib"
|
name = "kcl-lib"
|
||||||
version = "0.1.72"
|
version = "0.1.73"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"approx",
|
"approx",
|
||||||
@ -3014,9 +3014,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.38.0"
|
version = "1.38.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a"
|
checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
@ -16,7 +16,7 @@ gloo-utils = "0.2.0"
|
|||||||
kcl-lib = { path = "kcl" }
|
kcl-lib = { path = "kcl" }
|
||||||
kittycad.workspace = true
|
kittycad.workspace = true
|
||||||
serde_json = "1.0.120"
|
serde_json = "1.0.120"
|
||||||
tokio = { version = "1.38.0", features = ["sync"] }
|
tokio = { version = "1.38.1", features = ["sync"] }
|
||||||
toml = "0.8.14"
|
toml = "0.8.14"
|
||||||
uuid = { version = "1.10.0", features = ["v4", "js", "serde"] }
|
uuid = { version = "1.10.0", features = ["v4", "js", "serde"] }
|
||||||
wasm-bindgen = "0.2.91"
|
wasm-bindgen = "0.2.91"
|
||||||
@ -29,7 +29,7 @@ image = { version = "0.25.1", default-features = false, features = ["png"] }
|
|||||||
kittycad = { workspace = true, default-features = true }
|
kittycad = { workspace = true, default-features = true }
|
||||||
pretty_assertions = "1.4.0"
|
pretty_assertions = "1.4.0"
|
||||||
reqwest = { version = "0.11.26", default-features = false }
|
reqwest = { version = "0.11.26", default-features = false }
|
||||||
tokio = { version = "1.38.0", features = ["rt-multi-thread", "macros", "time"] }
|
tokio = { version = "1.38.1", features = ["rt-multi-thread", "macros", "time"] }
|
||||||
twenty-twenty = "0.8"
|
twenty-twenty = "0.8"
|
||||||
uuid = { version = "1.10.0", features = ["v4", "js", "serde"] }
|
uuid = { version = "1.10.0", features = ["v4", "js", "serde"] }
|
||||||
|
|
||||||
|
@ -12,4 +12,4 @@ kcl-lib = { version = "0.1.70", path = "../kcl" }
|
|||||||
pico-args = "0.5.0"
|
pico-args = "0.5.0"
|
||||||
serde = { version = "1.0.204", features = ["derive"] }
|
serde = { version = "1.0.204", features = ["derive"] }
|
||||||
serde_json = "1.0.120"
|
serde_json = "1.0.120"
|
||||||
tokio = { version = "1.38.0", features = ["macros", "rt-multi-thread"] }
|
tokio = { version = "1.38.1", features = ["macros", "rt-multi-thread"] }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "kcl-lib"
|
name = "kcl-lib"
|
||||||
description = "KittyCAD Language implementation and tools"
|
description = "KittyCAD Language implementation and tools"
|
||||||
version = "0.1.72"
|
version = "0.1.73"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/KittyCAD/modeling-app"
|
repository = "https://github.com/KittyCAD/modeling-app"
|
||||||
@ -46,7 +46,7 @@ zip = { version = "2.0.0", default-features = false }
|
|||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
js-sys = { version = "0.3.69" }
|
js-sys = { version = "0.3.69" }
|
||||||
tokio = { version = "1.38.0", features = ["sync", "time"] }
|
tokio = { version = "1.38.1", features = ["sync", "time"] }
|
||||||
tower-lsp = { version = "0.20.0", default-features = false, features = ["runtime-agnostic"] }
|
tower-lsp = { version = "0.20.0", default-features = false, features = ["runtime-agnostic"] }
|
||||||
wasm-bindgen = "0.2.91"
|
wasm-bindgen = "0.2.91"
|
||||||
wasm-bindgen-futures = "0.4.42"
|
wasm-bindgen-futures = "0.4.42"
|
||||||
@ -87,7 +87,7 @@ image = { version = "0.25.1", default-features = false, features = ["png"] }
|
|||||||
insta = { version = "1.38.0", features = ["json"] }
|
insta = { version = "1.38.0", features = ["json"] }
|
||||||
itertools = "0.13.0"
|
itertools = "0.13.0"
|
||||||
pretty_assertions = "1.4.0"
|
pretty_assertions = "1.4.0"
|
||||||
tokio = { version = "1.37.0", features = ["rt-multi-thread", "macros", "time"] }
|
tokio = { version = "1.38.1", features = ["rt-multi-thread", "macros", "time"] }
|
||||||
twenty-twenty = "0.8.0"
|
twenty-twenty = "0.8.0"
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
|
@ -160,11 +160,24 @@ impl EngineConnection {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::field_reassign_with_default)]
|
||||||
pub async fn new(ws: reqwest::Upgraded) -> Result<EngineConnection> {
|
pub async fn new(ws: reqwest::Upgraded) -> Result<EngineConnection> {
|
||||||
|
// allowing the field_reassign_with_default lint here because the
|
||||||
|
// defaults for this object don't match the type defaults. We want
|
||||||
|
// to inherent the default config
|
||||||
|
//
|
||||||
|
// See the `impl Default for WebSocketConfig` in
|
||||||
|
// `tungstenite/protocol/mod.rs`
|
||||||
|
|
||||||
|
let mut wsconfig = tokio_tungstenite::tungstenite::protocol::WebSocketConfig::default();
|
||||||
|
// 4294967296 bytes, which is around 4.2 GB.
|
||||||
|
wsconfig.max_message_size = Some(0x100000000);
|
||||||
|
wsconfig.max_frame_size = Some(0x100000000);
|
||||||
|
|
||||||
let ws_stream = tokio_tungstenite::WebSocketStream::from_raw_socket(
|
let ws_stream = tokio_tungstenite::WebSocketStream::from_raw_socket(
|
||||||
ws,
|
ws,
|
||||||
tokio_tungstenite::tungstenite::protocol::Role::Client,
|
tokio_tungstenite::tungstenite::protocol::Role::Client,
|
||||||
Some(tokio_tungstenite::tungstenite::protocol::WebSocketConfig { ..Default::default() }),
|
Some(wsconfig),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 123 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |