Repository navigation
feat(Compilers): add COBOL support - #1055
Conversation
|
Fixed the failing Spell Check CI job on PR #1055. Diagnosis: Fix: Added Note: the repo prepush hook fails in Task list (1/5 completed)
|
✅ Deploy Preview for livecodes ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Addressed all 4 SonarCloud findings (cross-origin Verified with Task list (6/6 completed)
|
Deploying livecodes with
|
| Latest commit: |
cd5d6ce
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ec106dcd.livecodes.pages.dev |
| Branch Preview URL: | https://pullfrog-1054-add-cobol-lang.livecodes.pages.dev |
|
Size Change: +4 kB (+0.33%) Total Size: 1.21 MB 📦 View Changed
ℹ️ View Unchanged
|
|
@pullfrog use this as the logo <svg viewBox="0 0 300 300" xmlns="http://www.w3.org/2000/svg" width="300" height="300" fill="none"><path fill="#005CA5" d="M208.5 61.368a41.713 41.713 0 0 0 16.547-23.643 43.475 43.475 0 0 1-.169 20.221c-2.091 5.457-5.316 10.379-7.819 15.647A204.09 204.09 0 0 1 259.8 46.05c-4.519 13.95-17.072 22.387-26.297 33.093 1.781 3.835 2.625 9.272 7.5 10.397a47.21 47.21 0 0 0 23.437 1.453c8.55-2.934 12.61-11.793 16.875-19.078v13.772a147.577 147.577 0 0 1-5.456 16.388c1.875 5.128 3.834 10.237 5.456 15.44v8.925c-2.006 3.45-4.143 6.806-6.215 10.21a49.618 49.618 0 0 0-10.013-10.894 37.781 37.781 0 0 0-17.353-1.172 30.116 30.116 0 0 0 22.622 13.781c-3.366 3.469-6.216 8.55-11.531 9.085-15.385 2.315-30.066-4.735-45.366-4.688-2.644.188-6.628.225-7.359 3.488 0 6.89 2.034 13.621 1.781 20.512-.553 11.794-4.8 23.119-4.959 34.931a129.186 129.186 0 0 0 7.856 32.325c-4.903-.722-9.788-1.556-14.644-2.437-.937 1.95-1.725 3.937-2.437 5.944a42.305 42.305 0 0 0 10.678 11.203 539.555 539.555 0 0 0-2.26 4.762l-5.372 1.294a412.684 412.684 0 0 1-3.75 6.928 41.45 41.45 0 0 0-20.625.572 1076.01 1076.01 0 0 1-13.021-5.316 55.67 55.67 0 0 0 3.815-21.703c-2.644-9.206-15-9.225-18.75-17.597a58.442 58.442 0 0 1-9.581-26.728c-7.716-4.059-13.641-11.447-22.5-13.125-.45 3.835-.778 7.688-1.434 11.503a56.397 56.397 0 0 1-12.638 22.557c.366 3.956.74 7.893 1.125 11.859a1482.79 1482.79 0 0 1 9.684 9.131A91.378 91.378 0 0 1 95.7 239.55a104.22 104.22 0 0 1-15.816.721c-2.419-2.381-4.856-4.762-7.284-7.162a45.666 45.666 0 0 0 1.069-24.45c1.603-3.75 3.056-7.613 4.453-11.447a52.17 52.17 0 0 1-28.22 1.931A48 48 0 0 1 19.06 158.55a36.176 36.176 0 0 1 13.19-30.638A60.096 60.096 0 0 0 30 152.428a28.481 28.481 0 0 0 23.438 23.118 32.45 32.45 0 0 0 18.375-6.028 70.126 70.126 0 0 1 3.403-38.747 51.786 51.786 0 0 1 33.619-24.937 39.7 39.7 0 0 0 18.853-14.681 100.042 100.042 0 0 1 14.335-12.469c-2.138-2.053-4.247-4.125-6.375-6.178a20.188 20.188 0 0 0 13.415-16.04c12.038-2.813 23.916-6.198 35.813-9.479a35.562 35.562 0 0 0 13.265 5.681c2.972 3.244 4.632 10.847 10.313 8.7m-35.41 125.269c.394 7.2-.45 15.609 6.319 20.203 0-7.078-.431-14.128-.937-21.187l-5.382.984Z"/></svg> |
|
Updated Pushed to
|
|
The failing check was the SonarCloud Code Analysis quality gate ( Fix (pushed to the PR):
Verification:
Note: the merge also folded in the concurrent Task list (8/8 completed)
|
|
when the starter template loads it shows: "You clicked 1 times." even before any clicks |
|
Fixed the COBOL starter counter: it now shows "You clicked 0 times." on load and increments from there. The cause was the initial stdin ( Verified by running the exact starter program through Pushed to PR #1055.
|
…gate The quality gate failed on 13.5% duplication on new code. Extract the worker runner shared by the WASM languages into worker-runner.ts and use it from the fortran, clang, ada, assembly and cobol scripts, replacing the copy in each. Also drop the regenerated storybook stories from the diff (they are rebuilt by build:storybook from the same _stories source) so the six identical per-framework files no longer contribute duplicated new lines.
…-support' into pr-1055
|
i18n ActionsSource PR has been merged into the default branch. Maintainers can comment |




Closes #1054.
Adds COBOL (Wasm) support, powered by
@live-codes/cobol-wasm— the real GnuCOBOL 3.2 compiler compiled to WebAssembly. The toolchain translates COBOL to C, compiles that with Clang/LLD, linkslibcob/GMP, and runs the resulting WASI module entirely in the browser.Implemented following the recently added Wasm languages (
fortran-wasm,ada-wasm,clang-wasm):src/livecodes/languages/cobol-wasm/— language spec, worker-based runtime script, and unit test.dist/cobol-wasm.global.js, which setsself.cobolWasm) in a classic worker viaimportScripts.baseUrlat the package'sassets/(holdscobol/) andclangBaseUrlat the exact@live-codes/clang-wasm@0.3.0/assets/the package pins for its Clang half.compiler.run(code, input)runs in the worker; a run timeout tears the worker down so a non-terminating program cannot wedge later runs.liveReload: true,largeDownload: true; exposeslivecodes.cobol/livecodes.cobolWasmwith.run(),.loaded,.output,.error,.exitCode,.input.customSettings['cobol-wasm']:sourceFormat(free/fixed),compileArgs,cCompileArgs,args,fileName.cobol), CodeMirror (codemirror-lang-cobol), CodeJar (Prismcobol).vendors.ts,languages.ts, SDKLanguage/TemplateName,Compiler.scriptType,scripts/build.jsiife entry, command menu.cobol.svgthumbnail, registered in the starter list and docsTemplateList/LanguageSliders.language-info.htmlsection and documentation pagedocs/docs/languages/cobol-wasm.mdx.vendor-licenses.mdnote: the package's own code is MIT, but itsassets/cobol/conveys GnuCOBOL (GPL-3.0-or-later); neither GnuCOBOL nor Clang is bundled by LiveCodes.functions/vendors/templates.js,server/php/inc/starter-templates.json, storybook stories, and EN + non-EN locale strings.Non-English locale strings were derived from each locale's existing
fortran-wasmentry (preserving each locale's terminology and tag structure).Test plan
npm run build:app,npm run test(typecheck app/docs/storybook, lint, unit tests, i18n-export, broken links) all pass.lang-cobol-wasm.spec.tscovers the spec's registration, extensions, large-download flag, and editor mapping.dist/cobol-wasm.global.js,assets/cobol/*,@live-codes/clang-wasm@0.3.0/assets/*, CORS*).To try it:
?template=cobol-wasm(or paste COBOL in the script editor).deepseek-v4.1-flash(free via Pullfrog for OSS) | 𝕏