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

Run tests of gixsql in CI with the new preprocessor #372

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d879fd4
Add a skeleton for SQL preprocessor
lefessan Jun 21, 2024
951de55
SQL is parsed
LilyOlivier Jun 26, 2024
f25b81b
try to copy
LilyOlivier Jun 27, 2024
7fc9933
Add CONNECT and CONNECT RESET
LilyOlivier Jun 28, 2024
e46a5b6
light integration of typeck, size seems correctly calculated
LilyOlivier Jul 10, 2024
cdad875
typoS
LilyOlivier Jul 11, 2024
9a91b6a
refactoring
LilyOlivier Jul 26, 2024
213d2d1
Start transaction
LilyOlivier Jul 29, 2024
29e1955
Merge and conflict resolve
LilyOlivier Jul 29, 2024
500b284
drom
LilyOlivier Jul 29, 2024
61c5c87
add some Cursor utilities
LilyOlivier Aug 2, 2024
ad2bf0a
fix Select Into
LilyOlivier Aug 12, 2024
5c987a9
add Prepare Into and fix typos
LilyOlivier Aug 12, 2024
45be81d
fix Insert
LilyOlivier Aug 13, 2024
ca64c9d
fix select into and simplification
LilyOlivier Aug 14, 2024
a85b842
rework error_treatment, fix cursor, add DeclareTable
LilyOlivier Aug 16, 2024
4f9eb71
fix Cursor and fix some type calculation
LilyOlivier Aug 20, 2024
6b64ff5
somes changes
LilyOlivier Aug 28, 2024
a2be3da
better copy
LilyOlivier Sep 9, 2024
917bd30
note for the one who will continue this work
LilyOlivier Sep 20, 2024
8fa6cf1
Merge branch 'master' into sql_preproc
NeoKaios Oct 3, 2024
4e38236
fix: merge build errors
NeoKaios Oct 4, 2024
ba14fe9
fix: problem with long sql stmt generation
NeoKaios Oct 7, 2024
6e81be0
docs: how to run gixsql test for superbol
NeoKaios Oct 7, 2024
93430b2
fix: multiple bugfixes and refactors
NeoKaios Oct 11, 2024
ff2a927
fix: grammar and add cbsql to cob_extension
NeoKaios Oct 14, 2024
36c117a
feat: update gixsql testsuite doc
NeoKaios Oct 14, 2024
ff34002
fix: failing test
NeoKaios Oct 16, 2024
85cd08c
feat: add sql_ast visitor, fix typo in types
NeoKaios Oct 16, 2024
9c00487
chore: refactor, and using ast visitor
NeoKaios Oct 16, 2024
b0b7364
feat: reactivate sql preproc, go to def/ref active in exec block
NeoKaios Oct 16, 2024
d9adafd
test: autopromote
NeoKaios Oct 16, 2024
3c5fc3b
Add gixsql submodule
Halbaroth Oct 17, 2024
bcc49c0
Add wrapper for the test script
Halbaroth Oct 17, 2024
c89baa7
Add nix in the GitHub workflow
Halbaroth Oct 17, 2024
d613b9f
Add the new preprocessor
Halbaroth Oct 17, 2024
72a4bff
Use a public address for gixsql submodule
Halbaroth Oct 17, 2024
e141aac
Use the Drom templates
Halbaroth Oct 17, 2024
cb8866a
Absolute path to superbol-free in the runner
Halbaroth Oct 18, 2024
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
99 changes: 59 additions & 40 deletions .drom

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- run: opam pin add . -y --no-action

- run: opam depext -y superbol-studio-oss superbol-vscode-platform polka-js-stubs interop-js-stubs node-js-stubs vscode-js-stubs vscode-languageclient-js-stubs vscode-json vscode-debugadapter vscode-debugprotocol superbol-free superbol_free_lib superbol_preprocs superbol_project cobol_common cobol_parser cobol_ptree ebcdic_lib cobol_lsp ppx_cobcflags pretty cobol_config cobol_indent cobol_indent_old cobol_preproc cobol_data cobol_typeck cobol_unit ez_toml ezr_toml sql_ast sql_parser
- run: opam depext -y superbol-studio-oss superbol-vscode-platform polka-js-stubs interop-js-stubs node-js-stubs vscode-js-stubs vscode-languageclient-js-stubs vscode-json vscode-debugadapter vscode-debugprotocol superbol-free superbol_free_lib superbol_preprocs superbol_project cobol_common cobol_parser cobol_ptree ebcdic_lib cobol_lsp ppx_cobcflags pretty cobol_config cobol_indent cobol_indent_old cobol_preproc cobol_data cobol_typeck cobol_unit ez_toml ezr_toml sql_preproc sql_ast sql_parser
# if: steps.cache-opam.outputs.cache-hit != 'true'

- run: opam install -y opam/*.opam --deps-only --with-test
Expand Down Expand Up @@ -91,9 +91,17 @@ jobs:
if: matrix.skip_test != 'true'
run: make dev-deps

- name: install nix
if: matrix.skip_test != 'true'
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: run test suite
run: make test
if: matrix.skip_test != 'true'
env:
SUPERBOL_PP: "${{ github.workspace }}/_build/install/default/bin/superbol-free"

- name: show test result on failure
if: failure()
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/workflow.yml.drom-tpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,17 @@ jobs:

# Use fields.github-workflow-after-build to add something here
!(github-workflow-after-build)
- name: install nix
if: matrix.skip_test != 'true'
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: run test suite
run: make test
if: matrix.skip_test != 'true'
env:
SUPERBOL_PP: "${{ github.workspace }}/_build/install/default/bin/superbol-free"

- name: show test result on failure
if: failure()
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@
path = import/superbol-vscode-debug
url = https://github.com/OCamlPro/superbol-vscode-debug.git
branch = superbol-vscode-debug
[submodule "import/gixsql"]
path = import/gixsql
url = https://github.com/OCamlPro/gixsql.git
3 changes: 2 additions & 1 deletion Makefile

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

1 change: 1 addition & 0 deletions Makefile.drom-tpl
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ test:
./scripts/before.sh test
${DUNE} build ${DUNE_ARGS} ${DUNE_CROSS_ARGS} @runtest
${MAKE} test-syntax
./scripts/test-gixsql.sh
./scripts/after.sh test

clean:
Expand Down
4 changes: 4 additions & 0 deletions drom.toml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ dir = "src/vendor/ez_toml"
dir = "src/lsp/ezr_toml"
# edit 'src/lsp/ezr_toml/package.toml' for package-specific options

[[package]]
dir = "src/lsp/sql_preproc"
# edit 'src/lsp/ezr_toml/package.toml' for package-specific options

[[package]]
dir = "src/lsp/sql_ast"
# edit 'src/lsp/sql_ast/package.toml' for package-specific options
Expand Down
19 changes: 19 additions & 0 deletions dune-project

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

1 change: 1 addition & 0 deletions import/gixsql
Submodule gixsql added at 3e6b30
2 changes: 2 additions & 0 deletions opam/cobol_typeck.opam
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ install: [
depends: [
"ocaml" {>= "4.14.0"}
"dune" {>= "2.8.0"}
"superbol_preprocs" {= version}
"sql_ast" {= version}
"cobol_unit" {= version}
"cobol_ptree" {= version}
"cobol_parser" {= version}
Expand Down
2 changes: 2 additions & 0 deletions opam/osx/cobol_typeck-osx.opam
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ install: [
depends: [
"ocaml" {>= "4.14.0"}
"dune" {>= "2.8.0"}
"superbol_preprocs-osx" {= version}
"sql_ast-osx" {= version}
"cobol_unit-osx" {= version}
"cobol_ptree-osx" {= version}
"cobol_parser-osx" {= version}
Expand Down
60 changes: 60 additions & 0 deletions opam/osx/sql_preproc-osx.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This file was generated by `drom` from `drom.toml`.
# Do not modify, or add to the `skip` field of `drom.toml`.
opam-version: "2.0"
name: "sql_preproc"
version: "0.1.4"
license: "MIT"
synopsis: "SuperBOL Studio OSS Project"
description: "SuperBOL Studio OSS is a new platform for COBOL"
authors: [
"Nicolas Berthier <[email protected]>"
"David Declerck <[email protected]>"
"Boris Eng <[email protected]>"
"Fabrice Le Fessant <[email protected]>"
"Emilien Lemaire <[email protected]>"
]
maintainer: [
"Nicolas Berthier <[email protected]>"
"David Declerck <[email protected]>"
"Boris Eng <[email protected]>"
"Fabrice Le Fessant <[email protected]>"
"Emilien Lemaire <[email protected]>"
]
homepage: "https://ocamlpro.github.io/superbol-studio-oss"
doc: "https://ocamlpro.github.io/superbol-studio-oss/sphinx"
bug-reports: "https://github.com/ocamlpro/superbol-studio-oss/issues"
dev-repo: "git+https://github.com/ocamlpro/superbol-studio-oss.git"
tags: "org:ocamlpro"
build: [
["dune" "subst"] {dev}
["sh" "-c" "./scripts/before.sh build '%{name}%'"]
[
"dune"
"build"
"-p"
"sql_preproc"
"-x"
"osx"
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["sh" "-c" "./scripts/after.sh build '%{name}%'"]
]
install: [
["sh" "-c" "./scripts/before.sh install '%{name}%'"]
]
depends: [
"ocaml" {>= "4.14.0"}
"dune" {>= "2.8.0"}
"superbol_preprocs-osx" {= version}
"ppx_deriving-osx" {>= "5.2.1"}
"ez_file-osx" {>= "0.3"}
"cobol_unit-osx" {= version}
"cobol_typeck-osx" {= version}
"cobol_indent-osx" {= version}
"odoc" {with-doc}
]
# Content of `opam-trailer` field:
1 change: 1 addition & 0 deletions opam/osx/superbol_free_lib-osx.opam
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ depends: [
"dune" {>= "2.8.0"}
"vscode-json-osx" {= version}
"superbol_preprocs-osx" {= version}
"sql_preproc-osx" {= version}
"lwt-osx" {>= "5"}
"ez_toml-osx" {= version}
"ez_file-osx" {>= "0.3"}
Expand Down
58 changes: 58 additions & 0 deletions opam/sql_preproc.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This file was generated by `drom` from `drom.toml`.
# Do not modify, or add to the `skip` field of `drom.toml`.
opam-version: "2.0"
name: "sql_preproc"
version: "0.1.4"
license: "MIT"
synopsis: "SuperBOL Studio OSS Project"
description: "SuperBOL Studio OSS is a new platform for COBOL"
authors: [
"Nicolas Berthier <[email protected]>"
"David Declerck <[email protected]>"
"Boris Eng <[email protected]>"
"Fabrice Le Fessant <[email protected]>"
"Emilien Lemaire <[email protected]>"
]
maintainer: [
"Nicolas Berthier <[email protected]>"
"David Declerck <[email protected]>"
"Boris Eng <[email protected]>"
"Fabrice Le Fessant <[email protected]>"
"Emilien Lemaire <[email protected]>"
]
homepage: "https://ocamlpro.github.io/superbol-studio-oss"
doc: "https://ocamlpro.github.io/superbol-studio-oss/sphinx"
bug-reports: "https://github.com/ocamlpro/superbol-studio-oss/issues"
dev-repo: "git+https://github.com/ocamlpro/superbol-studio-oss.git"
tags: "org:ocamlpro"
build: [
["dune" "subst"] {dev}
["sh" "-c" "./scripts/before.sh build '%{name}%'"]
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["sh" "-c" "./scripts/after.sh build '%{name}%'"]
]
install: [
["sh" "-c" "./scripts/before.sh install '%{name}%'"]
]
depends: [
"ocaml" {>= "4.14.0"}
"dune" {>= "2.8.0"}
"superbol_preprocs" {= version}
"ppx_deriving" {>= "5.2.1"}
"ez_file" {>= "0.3"}
"cobol_unit" {= version}
"cobol_typeck" {= version}
"cobol_indent" {= version}
"odoc" {with-doc}
]
# Content of `opam-trailer` field:
1 change: 1 addition & 0 deletions opam/superbol_free_lib.opam
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ depends: [
"dune" {>= "2.8.0"}
"vscode-json" {= version}
"superbol_preprocs" {= version}
"sql_preproc" {= version}
"lwt" {>= "5"}
"ez_toml" {= version}
"ez_file" {>= "0.3"}
Expand Down
2 changes: 2 additions & 0 deletions opam/windows/cobol_typeck-windows.opam
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ install: [
depends: [
"ocaml" {>= "4.14.0"}
"dune" {>= "2.8.0"}
"superbol_preprocs-windows" {= version}
"sql_ast-windows" {= version}
"cobol_unit-windows" {= version}
"cobol_ptree-windows" {= version}
"cobol_parser-windows" {= version}
Expand Down
60 changes: 60 additions & 0 deletions opam/windows/sql_preproc-windows.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This file was generated by `drom` from `drom.toml`.
# Do not modify, or add to the `skip` field of `drom.toml`.
opam-version: "2.0"
name: "sql_preproc"
version: "0.1.4"
license: "MIT"
synopsis: "SuperBOL Studio OSS Project"
description: "SuperBOL Studio OSS is a new platform for COBOL"
authors: [
"Nicolas Berthier <[email protected]>"
"David Declerck <[email protected]>"
"Boris Eng <[email protected]>"
"Fabrice Le Fessant <[email protected]>"
"Emilien Lemaire <[email protected]>"
]
maintainer: [
"Nicolas Berthier <[email protected]>"
"David Declerck <[email protected]>"
"Boris Eng <[email protected]>"
"Fabrice Le Fessant <[email protected]>"
"Emilien Lemaire <[email protected]>"
]
homepage: "https://ocamlpro.github.io/superbol-studio-oss"
doc: "https://ocamlpro.github.io/superbol-studio-oss/sphinx"
bug-reports: "https://github.com/ocamlpro/superbol-studio-oss/issues"
dev-repo: "git+https://github.com/ocamlpro/superbol-studio-oss.git"
tags: "org:ocamlpro"
build: [
["dune" "subst"] {dev}
["sh" "-c" "./scripts/before.sh build '%{name}%'"]
[
"dune"
"build"
"-p"
"sql_preproc"
"-x"
"windows"
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["sh" "-c" "./scripts/after.sh build '%{name}%'"]
]
install: [
["sh" "-c" "./scripts/before.sh install '%{name}%'"]
]
depends: [
"ocaml" {>= "4.14.0"}
"dune" {>= "2.8.0"}
"superbol_preprocs-windows" {= version}
"ppx_deriving-windows" {>= "5.2.1"}
"ez_file-windows" {>= "0.3"}
"cobol_unit-windows" {= version}
"cobol_typeck-windows" {= version}
"cobol_indent-windows" {= version}
"odoc" {with-doc}
]
# Content of `opam-trailer` field:
1 change: 1 addition & 0 deletions opam/windows/superbol_free_lib-windows.opam
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ depends: [
"dune" {>= "2.8.0"}
"vscode-json-windows" {= version}
"superbol_preprocs-windows" {= version}
"sql_preproc-windows" {= version}
"lwt-windows" {>= "5"}
"ez_toml-windows" {= version}
"ez_file-windows" {>= "0.3"}
Expand Down
4 changes: 2 additions & 2 deletions package.json

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

Loading
Loading