[pull] main from graphql:main - #217
Merged
Merged
Conversation
## Summary Use one build system for the repository so clean checkouts, targeted builds, tests, and development commands build dependencies in the right order. Turbo handles scheduling and caching. GitHub Actions preserves task results between CI jobs and runs so unchanged work can be reused. Packages own their build tools and commands. Type errors fail builds before incomplete output can enter the cache. ## Changes - **Make package builds complete:** declare the compiler in each package, generate required module formats, and check types before bundling. - **Remove `wsrun`:** run extension bundles and demo builds through Turbo. - **Build before testing:** tests automatically build the packages they need. - **Cache all required output:** include declarations, extension bundles, and CodeMirror’s generated files. - **Reuse CI work:** save Turbo’s cache with GitHub Actions, restore package outputs through Turbo, and rebuild on cache misses. No external cache account or secrets are required. Track the history plugin’s shared test setup so edits rerun its tests. - **Unify watching:** rebuild affected dependencies and restart development servers when needed. VS Code waits for a successful extension bundle before launching the debugger. - **Clarify cleaning:** keep normal builds incremental; provide explicit clean and rebuild commands. - **Update the development guide** with supported commands and expected behavior. ## Validation 1. **Build from scratch, then restore from cache.** - Run `yarn install --immutable`. - Run `yarn build:rebuild --force`; the build should succeed. - Run `yarn build:rebuild`; generated files should return through cache hits. 2. **Check direct package builds and type-error handling.** - Run `yarn workspace @graphiql/react build`; it should resolve the compiler and succeed. - Temporarily introduce a TypeScript error under `packages/graphiql-react/src`. - Repeat the command; it should fail before Vite starts. Remove the error afterward. 3. **Run tests without building first.** - Run `yarn build:clean`. - Run `yarn turbo run test --filter=cm6-graphql`. - Turbo should build or restore the required packages before running the tests. 4. **Check extension bundles and demo staging.** - Run `yarn build-bundles`; both VS Code packages should have bundles in `out`. - Run `yarn build-demo`; the webpack demos should appear under `packages/graphiql/webpack` and `packages/graphiql/monaco`. - Run `yarn build-bundles-clean`, then repeat both build commands. Cached builds should restore the bundles, and staging should recreate the demos. 5. **Check dependency watching.** - Run `yarn build:watch --filter=monaco-graphql...`. - Edit a source file in `graphql-language-service`; Monaco should rebuild and reapply its declaration patch. - Separately, run `yarn dev:graphiql` and make the same edit. GraphiQL should serve again after its dependencies rebuild. 6. **Check VS Code development tasks.** - Run `yarn watch-vscode` or `yarn watch-vscode-exec`. - Edit the corresponding extension’s source; another successful bundle message should appear. - Launch through the matching VS Code debug configuration; it should wait for the bundle before starting. 7. **Check CI cache reuse.** - Let the PR workflow complete, then select **Re-run all jobs**. - Check the **Turbo cache** steps for restored caches and the build, test, and type-check summaries for cached tasks. - Push a source change; affected tasks should run again while unchanged tasks reuse their results. - Turbo's `Remote caching disabled` message is expected: GitHub restores its local cache before each command.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )