Repository navigation
feat: add V language support - #1059
Conversation
✅ Deploy Preview for livecodes ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Fixed the failing check suite on PR #1059. Diagnosis: The only failing check was SonarCloud Code Analysis — the quality gate failed on 16.6% Duplication on New Code (limit 3%). The duplication came almost entirely from Fix (pushed in
Verification: Note: the PR description's browser smoke test for the v-wasm assets is still worth doing on a preview, as no behavior in the V runtime changed beyond using the shared runner. Task list (9/9 completed)
|
Deploying livecodes with
|
| Latest commit: |
6593a9b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f192ebc1.livecodes.pages.dev |
| Branch Preview URL: | https://pullfrog-1057-add-v-language.livecodes.pages.dev |
|
Merged
Verification:
|
The quality gate failed on 16.6% duplication on new code. Extract the worker runner shared by the WASM languages into worker-runner.ts and use it from the v-wasm, fortran, clang, ada and assembly scripts, replacing the copy in each.
Resolve conflicts in scripts/build.js, src/sdk/models.ts and storybook/_stories/EmbedOptions/template.ts (keep both the v-wasm and cobol-wasm additions), and deduplicate the V worker runner to use the shared worker-runner.ts introduced in da57767.
…to pullfrog/1057-add-v-language
|
Size Change: +3.72 kB (+0.31%) Total Size: 1.22 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Fixed the failing checks on this PR and pushed commit SonarCloud quality gate (
This leaves a single copy of each block, so the duplicated lines should drop well under the 3% threshold. Unit test regression (would have failed the CI Verified locally with Task list (5/5 completed)
|
Extract getParentOrigin, createLoadingReporter and runCompiler into a shared wasm-runtime module and reuse them across the worker-runner WASM scripts (v-wasm, cobol, fortran, assembly, clang, fanak, haskell). This removes the duplicated blocks that pushed the SonarCloud new-code duplication above the 3% gate. Also update the v-wasm spec to expect the Monaco 'v' language, which now ships in @live-codes/monaco-languages@0.3.11, replacing the stale 'go' expectation.
|
@pullfrog merge develop and resolve conflicts |
|
Merged Conflicts resolved (13 files): Verification: Task list (5/5 completed)
|
|
i18n ActionsSource PR has been merged into the default branch. Maintainers can comment |




Closes #1057
Adds V (Wasm) support using
@live-codes/v-wasm, following the pattern of the other recent WASM languages (Fortran, Zig, Clang).What changed
src/livecodes/languages/v-wasm/(v-wasm; aliasesv,vlang,v-wasm,wasm.v,vsh), pass-through compiler withliveReloadand a result-frame runtime that runs the V compiler in a classic worker.@live-codes/v-wasmIIFE viaimportScripts, creates the compiler with the package's own assets plus the pinned@live-codes/clang-wasm@0.3.0toolchain, and executes programs inline. Exposeslivecodes.v(input,loaded,output,error,exitCode,run) andlivecodes.vlang.v-wasm) with a V counter program and a V logo.docs/docs/languages/v-wasm.mdx, the language-info tooltip, language/template listings, and storybook stories.enkeys plus translations for all 17 other locales.Notes
vgrammar.@live-codes/clang-wasm@0.3.0/assets/, the version@live-codes/v-wasmbundles; the repo's own C/C++ languages remain on 0.2.0.application/gzipwithoutContent-Encoding, so the receipt checks pass on the raw bytes.Testing
npm run build:app,npm run test(all 412 unit tests),npm run lint:eslint, andnpm run lint:prettierpass.-1producedV\n0\n, input4producedV\n5\n.A browser smoke test on a deployed preview is recommended, since the package's asset verification uses
crypto.subtleinside the worker and is only exercised in a browser.deepseek-v4.1-flash(free via Pullfrog for OSS) | 𝕏