typelevel / typelevel/scalac-options

Add integration tests to check each supported scalac option against each supported scalac version

Open
#7 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
48
Forks
17
Avg merge
5h 6m
Merged PRs (30d)
4

Description

This is a call-out to trigger a discussion rather than an issue itself.

We could create an IntegrationTest configuration and add tests that would verify whether a certain scalac option is really supported for a specific scalac version.

Checking it by hand is quite boring and unreliable and it would be nice to automate it somehow.
A straightforward solution that comes to mind is using scala-cli for each option and every scala version the project supposed to support:

$ scala-cli compile -S 2.12.12 -O -Xlint:deprecation -- empty.scala
Compiling project (Scala 2.12.12, JVM)
Error: 'deprecation' is not a valid choice for '-Xlint'
Compiled project (Scala 2.12.12, JVM)

whereas

$ scala-cli compile -S 2.12.13 -O -Xlint:deprecation -- empty.scala

compiles without errors.

So would it be possible to employ scala-cli for integration tests in the project and does it look reasonable overall?

See also #5 for a related discussion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or existing test is named. Start by reviewing the proposed IntegrationTest configuration and the related discussion in #5, then assess how scala-cli could compile an empty.scala example across supported Scala versions and scalac options. Done would mean a decided, project-compatible approach rather than an implementation defined by this issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.