Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove vite-plugin-top-level-await plugin #9038

Merged
merged 3 commits into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/gui2/e2e/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'enso-dashboard/src/tailwind.css'
import { createPinia } from 'pinia'
import { initializeFFI } from 'shared/ast/ffi'
import { createApp, ref } from 'vue'
import { mockDataHandler, mockLSHandler } from '../mock/engine'
import '../src/assets/base.css'
@@ -55,4 +56,4 @@ provideVisualizationConfig._mock(
},
app,
)
app.mount('#app')
initializeFFI().then(() => app.mount('#app'))
1 change: 0 additions & 1 deletion app/gui2/package.json
Original file line number Diff line number Diff line change
@@ -129,7 +129,6 @@
"unbzip2-stream": "^1.4.3",
"vite": "^4.4.9",
"vite-plugin-inspect": "^0.7.38",
"vite-plugin-top-level-await": "^1.3.1",
"vitest": "^0.34.2",
"vue-react-wrapper": "^0.3.1",
"vue-tsc": "^1.8.8"
Original file line number Diff line number Diff line change
@@ -17,9 +17,12 @@ import {
import type { AstId } from '@/util/ast/abstract'
import { unwrap } from '@/util/data/result'
import { tryIdentifier, tryQualifiedName } from '@/util/qualifiedName'
import { initializeFFI } from 'shared/ast/ffi'
import type { ExternalId, Uuid } from 'shared/yjsModel'
import { expect, test } from 'vitest'

await initializeFFI()

test.each([
['', 0, { type: 'insert', position: 0 }, {}],
[
4 changes: 1 addition & 3 deletions app/gui2/src/components/GraphEditor/GraphNode.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script lang="ts">
<script setup lang="ts">
import { nodeEditBindings } from '@/bindings'
import CircularMenu from '@/components/CircularMenu.vue'
import GraphNodeError from '@/components/GraphEditor/GraphNodeError.vue'
@@ -38,9 +38,7 @@ const prefixes = Prefixes.FromLines({
skip: 'SKIP __',
freeze: 'FREEZE __',
})
</script>

<script setup lang="ts">
const props = defineProps<{
node: Node
edited: boolean
3 changes: 3 additions & 0 deletions app/gui2/src/providers/__tests__/widgetRegistry.test.ts
Original file line number Diff line number Diff line change
@@ -9,11 +9,14 @@ import {
import { GraphDb } from '@/stores/graph/graphDatabase'
import { Ast } from '@/util/ast'
import { ApplicationKind, ArgumentInfoKey } from '@/util/callTree'
import { initializeFFI } from 'shared/ast/ffi'
import { describe, expect, test } from 'vitest'
import { defineComponent } from 'vue'
import type { PortId } from '../portInfo'
import { DisplayMode, argsWidgetConfigurationSchema } from '../widgetRegistry/configuration'

await initializeFFI()

describe('WidgetRegistry', () => {
function makeMockWidget<T extends WidgetInput>(
name: string,
3 changes: 3 additions & 0 deletions app/gui2/src/stores/graph/__tests__/graphDatabase.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { asNodeId, GraphDb } from '@/stores/graph/graphDatabase'
import { Ast, RawAst } from '@/util/ast'
import assert from 'assert'
import { initializeFFI } from 'shared/ast/ffi'
import { IdMap, type ExternalId } from 'shared/yjsModel'
import { expect, test } from 'vitest'

await initializeFFI()

/**
* Create a predictable fake UUID which contains given number in decimal at the end.
* @param x sequential value, e.g. 15
3 changes: 3 additions & 0 deletions app/gui2/src/util/ast/__tests__/aliasAnalysis.test.ts
Original file line number Diff line number Diff line change
@@ -28,9 +28,12 @@
import { assertDefined } from '@/util/assert'
import { AliasAnalyzer } from '@/util/ast/aliasAnalysis'
import { MappedKeyMap, MappedSet } from '@/util/containers'
import { initializeFFI } from 'shared/ast/ffi'
import { sourceRangeKey, type SourceRange } from 'shared/yjsModel'
import { expect, test } from 'vitest'

await initializeFFI()

/** The type of annotation. */
enum AnnotationType {
/** An identifier binding (introducing variable). */
3 changes: 0 additions & 3 deletions app/gui2/src/util/ast/aliasAnalysis.ts
Original file line number Diff line number Diff line change
@@ -8,12 +8,9 @@ import {
readTokenSpan,
} from '@/util/ast'
import { MappedKeyMap, MappedSet, NonEmptyStack } from '@/util/containers'
import { initializeFFI } from 'shared/ast/ffi'
import type { LazyObject } from 'shared/ast/parserSupport'
import { rangeIsBefore, sourceRangeKey, type SourceRange } from 'shared/yjsModel'

await initializeFFI()

const ACCESSOR_OPERATOR = '.'

const LAMBDA_OPERATOR = '->'
3 changes: 1 addition & 2 deletions app/gui2/vite.config.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ import postcssNesting from 'postcss-nesting'
import tailwindcss from 'tailwindcss'
import tailwindcssNesting from 'tailwindcss/nesting'
import { defineConfig, type Plugin } from 'vite'
import topLevelAwait from 'vite-plugin-top-level-await'
// @ts-expect-error
import * as tailwindConfig from '../ide-desktop/lib/dashboard/tailwind.config'
import { createGatewayServer } from './ydoc-server'
@@ -18,7 +17,7 @@ const IS_CLOUD_BUILD = process.env.CLOUD_BUILD === 'true'
// https://vitejs.dev/config/
export default defineConfig({
cacheDir: '../../node_modules/.cache/vite',
plugins: [vue(), gatewayServer(), topLevelAwait()],
plugins: [vue(), gatewayServer()],
optimizeDeps: {
entries: 'index.html',
},
143 changes: 0 additions & 143 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.