Skip to content

Add new template based on dune and melange #345

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

kevgathuku
Copy link

@kevgathuku kevgathuku commented May 29, 2025

Following up on the conversation regarding the migration to a supported toolkit:
https://forum.exercism.org/t/progress-on-migrating-to-rescript/15829

This is just a demo of what I envision a typical exercise would look like if it was based on Melange + Dune

The idea of adding the template first is to show a minimal but working setup.

It compiles to JS and includes a testing setup and also a Makefile to avoid some of the manual steps.

Let's evaluate this approach and see where it goes. Happy to hear your feedback 😄

Also let me know if it would be better to target another branch other than main which would help to do the migration gradually

Copy link

Hello. Thanks for opening a PR on Exercism 🙂

We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in.

You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch.

If you're interested in learning more about this auto-responder, please read this blog post.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

Copy link

Hello 👋 Thanks for your PR.

This repo does not currently have dedicated maintainers. Our cross-track maintainers team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed.

If you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track.

Please feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the Exercism forum.

(cc @exercism/cross-track-maintainers)

@github-actions github-actions bot closed this May 29, 2025
Copy link

This is an unmaintained repository.

Cross-track maintainers - feel free to merge.

- Add Readme with getting started docs
- Remove runtests.js
- Simplify a lot of stuff
@SleeplessByte SleeplessByte reopened this May 29, 2025
@kevgathuku
Copy link
Author

kevgathuku commented Jun 1, 2025

I'll remove more unnecessary stuff and just keep it as minimal as possible like the existing template.

Also what's the tag to skip running CI for each commit? 😅

- move to jest for tests
- run all commands from npm
- add deps in dune-project

[skip ci]
@kevgathuku
Copy link
Author

kevgathuku commented Jun 1, 2025

The template is now ready.

Changes:

  • Keep the existing npm-based commands / workflow, including running tests with jest
  • Update the new-exercise script

Using bin/new-exercise.sh will now generate a fully functional exercise based on melange, including working tests.

@SleeplessByte SleeplessByte requested a review from a team June 1, 2025 20:40
Copy link

@vaeng vaeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vaeng
Copy link

vaeng commented Jun 2, 2025

Too bad we have no checks on this track to see if everything works fine. Maybe a new project @kevgathuku ;)

@kevgathuku
Copy link
Author

Too bad we have no checks on this track to see if everything works fine. Maybe a new project @kevgathuku ;)

Definitely. There are some changes I should undo here but will probably do that in a new PR as this one is already approved 😃

One idea is to create some test exercises with the new template, and ensure they can be built / run by the test runner https://github.com/exercism/reasonml-test-runner

@kevgathuku
Copy link
Author

Made the last changes to the template and now there's no more changes I expect to make here.

Next I'll move on to this:

Create some test exercise with the new template, and ensure they can be built / run by the test runner exercism/reasonml-test-runner

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.

3 participants