Repository navigation
Drop lens-person's unused scalaz solution, and move the exercise to Scala 3 syntax - #912
Conversation
The example carried two solutions, but `LensPerson` only mixed in the Monocle one; the scalaz one sat behind a comment. It still had to compile, though, and the test runner does not ship scalaz, so `bin/verify-exercises-in-docker lens-person` always failed. Remove the scalaz solution and its build dependency, and fold the Monocle solution into the object. Move it to Monocle 3's API (`andThen`, `replace`, `Iso`) instead of the deprecated symbolic operators and postfix calls. Reformat the stub and the test suite with optional braces, as `.scalafmt.conf` asks. Behaviour is unchanged, so existing solutions are not affected. [no important files changed] Closes #891 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested. If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos. For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping |
|
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) |
bin/verify-exercises-in-docker lens-personalways failed: the example importedscalaz.Lens, which the test runner does not ship (#891).The scalaz code was never used. The example defined two solutions, and
LensPersononly mixed in the Monocle one — the scalaz one sat behind a comment,/* with ScalazSolution */. It still had to compile, which is all that broke.Changes
ToBeImplementedtrait that only existed so both solutions shared an interface. Unused lenses (name,foreNames,year, …) go too.andThen,replace,modifyandIsoinstead of the deprecated^|->,^<->and postfixget/set, so thescala.language.postfixOpsimport goes as well.scalaz-coredependency.LensPerson.*, as.scalafmt.confasks; the obsolete@version created manuallyheader is removed. No test or signature changes.All four files pass
scalafmt --listwith the track's config.[no important files changed] — the test cases, the stub's signatures and the runner's dependencies are unchanged, so existing solutions behave exactly as before.
Verification
bin/test lens-person: 5 of 5 pass, no compiler warnings.bin/verify-exercises-in-docker lens-personagainstexercism/scala-test-runner:latest: exit 0.fail, as expected for???).Only
lens-personwas verified in Docker, not the whole track.Closes #891
🤖 Generated with Claude Code