`MOCK SQL` has not been verified with a real precompiler

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend, testing

Research direction

Read the in-program mode limitations in docs/reference.md and inspect the example project’s test setup. Find a real SQL precompiler that works with GnuCOBOL, then add a synthetic SQL program and run the in-program suite through the precompiler and compiler. Done means reporting their versions, whether the generated copy precompiles and compiles, the cobalto test totals, and any behavior that differs from GnuCOBOL.

Written by the indexing model from the issue text.

Description

help wanted limitation

MOCK SQL replaces the EXEC SQL ... END-EXEC statements of a program under test, so that a test case can set the host variables and SQLCODE without a database. Cobalto's own tests cover the rewrite, but the generated copy has never gone through a real SQL precompiler: GnuCOBOL does not ship one, and the example project has no program with EXEC SQL.

What is known today

  • The copy keeps the original EXEC SQL in the "no mock" branch, so it still goes through the site's precompiler before the compiler.
  • SQLCA has to be declared by the program itself.
  • The details are in the known limitations of in-program mode.

What would close this

An in-program suite with MOCK SQL run through at least one real precompiler, on a synthetic program, with:

  • the versions of the precompiler and the compiler;
  • whether the copy precompiles and compiles as generated, and if not, what had to change;
  • the totals line of cobalto test and any test case that behaves differently from GnuCOBOL.

An open source precompiler that works with GnuCOBOL would also let CI keep this verified, with a small SQL program added to the examples.

Reports are welcome with the Compiler report template. Please do not post programs or build output from a real system. This is one of the rows of the roadmap to 1.0.

Dominant language
Python
Stars
2
Forks
0
Avg merge
4h 51m
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from abstracta/cobalto

All issues in abstracta/cobalto

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.