Skip to content

Port to spago (CI) #185

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

Closed
wants to merge 7 commits into from
Closed

Port to spago (CI) #185

wants to merge 7 commits into from

Conversation

emiel
Copy link
Contributor

@emiel emiel commented May 9, 2021

Note: Supersedes draft PR #181

Here is my attempt to continue with the work done here #127 in replacing bower/pulp with spago. I focused on getting CI setup to build and test the concept and practice exercises. The approach is more or less similar to what was being done for bower. A "spago" project uses two files packages.dhall (defines package-set) and spago.dhall (project dependencies) for CI all exercises are built and tested using the same package set so that we can share the spago package cache (.spago) and build artifacts (output).

We gain some additional flexibility in that spago.dhall can now vary per exercise. This is nice because we can whittle down the exercise dependencies to the bare minimum and we save students some disk space. Also PureScript 0.14.x has started warning about unused dependencies... a topic for when we tackle porting the exercises to 0.14.x.

I chose to implement the build/test script in JavaScript (nodejs) as I couldn't find a nice (portable) way to handle kebab/pascal case conversion under Bash. I expect anyone working on PureScript to have nodejs installed anyway (I have no idea how the shell under windows situation is these days).

Work on updating the related documentation will follow in another PR as there is now quite some overlap with the official Exercism documentation and I'd like things to settle a bit a bit before tackling the docs. I expect there to be more changes as we migrate to PureScript 0.14.x especially in how we deal with dependencies.

Let me know if you have any questions. ;)

emiel added 7 commits May 9, 2021 15:18
This is a convenience rename to be able to convert from kebab-case to
pascal case (rna-transcription -> RnaTranscription) when testing under
CI.
- The `packages.dhall` file is considered the source of truth for the
  package set. All exercises should use the same package set so we can
  test them all at once on GitHub CI.

- `spago.dhall` is currently unused.
Update the packages.dhall file for concept exercises with the one from
./template (source of truth).
@emiel emiel mentioned this pull request May 9, 2021
Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

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

I'm totally fine with this PR. Is there another PureScript maintainer that can look at this?

On a side note: this change would break the existing test runner, so if merged, that should also be updated: https://github.com/exercism/purescript-test-runner

One important consideration to keep in mind is that the test runner runs without networking, so dhall has to support being able to use a pre-populated cache.

@emiel
Copy link
Contributor Author

emiel commented May 12, 2021

Thanks for the feedback @ErikSchierboom. I have now had a look at the test-runner and am in the progress of bringing it in line as well. I have some new ideas now and will try and incorporate those so I'll switch this PR back to draft for now. I'm slowly starting to understand how this all fits together. ;)

@ErikSchierboom
Copy link
Member

Brilliant! Let me know if you need any help.

@emiel
Copy link
Contributor Author

emiel commented May 25, 2021

I'm closing this for a simpler approach. Stay tuned...

@emiel emiel closed this May 25, 2021
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.

2 participants