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

Various fixes for OCaml cucumber #41

Merged
merged 7 commits into from
Dec 1, 2022
Merged

Conversation

tmcgilchrist
Copy link
Contributor

@tmcgilchrist tmcgilchrist commented Nov 24, 2022

🤔 What's changed?

I have fixed the following issues:

  • cmdliner deprecations
  • pulled in @brasmusson change to fix the C API c2b7d27
  • pointed to the new mono repo that contains gherkin-c
  • fixed the dune setup for linking against gherkin-c
  • fixes for generated documentation and examples.

I am looking at changing the bindings to use the ctypes library to cut down on the size of the c stubs.

⚡️ What's your motivation?

This should allow the project to build against the most recent version of gherkin-c and ideally be released to opam.

♻️ Anything particular you want feedback on?

Please test this on Windows if that is an important platform to support. I haven't myself as I don't have access to a Windows machine. Note I have tested it with ocaml-ci against a number of Linux and macOS platforms https://github.com/tmcgilchrist/cucumber.ml/runs/9697631507

Currently there is no test setup on this repo, would you be interested in either trying out ocam-ci (docs here https://ci.ocamllabs.io/getting-started) or setting up GH Actions to test this project.

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

@mpkorstanje
Copy link
Contributor

Looks good to me. Though my knowledge about OCaml is limited to nodding along with @cyocum enthusiastic explanations.

I'm merging this to keep some momentum going. More improvements, if any, can always be made later.

Please test this on Windows if that is an important platform to support. I haven't myself as I don't have access to a Windows machine.

Unfortunately there are very few Windows Users in the Cucumber organisation. I don't think we can test this on Windows. But given that currently there are only a few people interested in Cucumber with OCaml I also think that is fine for now.

Currently there is no test setup on this repo, would you be interested in either trying out ocam-ci (docs here https://ci.ocamllabs.io/getting-started) or setting up GH Actions to test this project.

I think that would prudent. It would also allow Windows to be covered.

Once I merge this a bot will come by and give you commiter permissions. At this point you can work directly in this repo. If you want to setup CI please feel free to do so.

The ci option does look nice but needs a core team member to set it up. So that's less than ideal.

@mpkorstanje mpkorstanje merged commit 144289f into cucumber:main Dec 1, 2022
@aslakhellesoy
Copy link
Contributor

Hi @tmcgilchrist,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

tmcgilchrist added a commit to tmcgilchrist/opam-repository that referenced this pull request Mar 29, 2023
CHANGES:

* before updating we need to init the submodule (cucumber/cucumber.ml#37).

* Add GitHub Actions CI (@tmcgilchrist cucumber/cucumber.ml#42 cucumber/cucumber.ml#44).

* Various fixes for OCaml cucumber (@tmcgilchrist cucumber/cucumber.ml#41).

* Improve odoc documentation and add an example.

* Update base to v0.15.1 updating OCaml lower bound to 4.10.0.

* Update README with a working example.

* Fixup linking against libgherkin.

* Adapt to the interface changes when updating to gherkin-c v23.

* Move git submodule to https://github.com/cucumber/gherkin monorepo.

* Fixup cmdliner deprecations and update dune.

* Updated README to read a bit better.

* Updated Readme to reflect the new build steps.

* Removed unnecessary submodule.

* Updated dune project information to get things ready for release.

* Updated dune files to use autogenerated opam.

* Updated test make file to work with new dune build stucture.

* Updated files to work with Dune's foreign lib interface.

* Added gherkin-c READ ONLY as a submodule.

* Updated based on rebase from master.

* Added dialect example in the README.

* Moved initialization of result code.

* Added whitespace for readability.

* Added the Dialect module to allow compile time checking of supported dialects of Cucumber

* Created a means for indicating feature file dialect.

* Removed unneeded flag in dune. * Removed unneeded flag in dune * Added freeing before caml_failwith just to ensure that everything is cleaned up before going back to OCaml runtime.

* Refactored long code block into function in gherkin_intf.c. * Refactored long code block into function in gherkin_intf.c * Fixed small memory leak due to TokenScanner not being deleted after it is done being used

* Added const qualifier to sFileName to fix cucumber/cucumber.ml#31.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants