Skip to content

lakefile now accepts an extra file#13

Merged
oxe-i merged 2 commits intoexercism:mainfrom
oxe-i:adjustLakefile
Apr 12, 2026
Merged

lakefile now accepts an extra file#13
oxe-i merged 2 commits intoexercism:mainfrom
oxe-i:adjustLakefile

Conversation

@oxe-i
Copy link
Copy Markdown
Contributor

@oxe-i oxe-i commented Apr 11, 2026

  1. Adds the flag --wfail to lake test to treat warnings as errors.
  2. Adjust lakefile.toml so that it accepts an extra file called Extra.lean.

For performance reasons, we don't use the exercises' lakefile.toml in the test runner. This is because we pre-build some modules to reduce build times during tests.

However, once lakefile.toml changes, lake recompiles all the modules, so, in order to pre-build, we must have a generic lakefile that is used when creating the test-runner docker image and again to test every exercise.

This generic lakefile.toml currently has a structure that only accepts the solution file and the test files, making it impossible to implement exercises that accept extra modules. This PR fixes that by adding an extra Extra.lean module to the lakefile.

While doing that, I've also added --wfail to lake test and an extra configuration to lakefile.toml. Both serve to treat warnings as errors, making the build to fail. This is necessary in some exercises and good practice in the others.

@oxe-i oxe-i requested a review from a team as a code owner April 11, 2026 20:30
Copy link
Copy Markdown
Contributor

@keiravillekode keiravillekode left a comment

Choose a reason for hiding this comment

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

Some additional context motivating this change is in

exercism/lean#176
exercism/lean#177

@oxe-i
Copy link
Copy Markdown
Contributor Author

oxe-i commented Apr 12, 2026

@exercism/guardians just in case the notification got lost

@oxe-i oxe-i merged commit eb7972e into exercism:main Apr 12, 2026
3 checks passed
@oxe-i oxe-i deleted the adjustLakefile branch April 12, 2026 18:30
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