Skip to content
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

Warn user about incompatible Java / Scala versions #3236

Open
lefou opened this issue Jun 27, 2024 · 2 comments
Open

Warn user about incompatible Java / Scala versions #3236

lefou opened this issue Jun 27, 2024 · 2 comments
Labels
good-first-issue The fix/solution for the issue is considered easy. A good starting point for newbies.

Comments

@lefou
Copy link
Member

lefou commented Jun 27, 2024

Questions about compile errors which are the result of a combination of a too new Java version and a too old Scala version come regularily in the chat and issues. We could maintain a simple matrix for minimal required Scala versions per Java version and log a warning or add an additional message if the compilation fails, to guide the user.

The comfigured Scala version {version} is known to be not compatible to JVM {version}.
Please update to at least Scala {version} by overriding:

  def scalaVersion = "{version}"
@lefou lefou added the good-first-issue The fix/solution for the issue is considered easy. A good starting point for newbies. label Jun 27, 2024
@saitejaswinisamala
Copy link

Hi @lefou, This is my first attempt at contributing, so please excuse me if my questions seem trivial.

  1. For defining the compatible versions matrix, can i rely on Scala JDK compatibility docs or is there any other resource that we are expected to refer to?

  2. Can this problem be addressed by introducing a check task in the build.sc file that runs before the compile task?

Thanks in advance !

@lefou
Copy link
Member Author

lefou commented Jul 25, 2024

Hi @saitejaswinisamala, welcome to Mill.

  1. For defining the compatible versions matrix, can i rely on Scala JDK compatibility docs or is there any other resource that we are expected to refer to?

I think it's a good start. We can deviate if needed. Ideally you add a link to that page into a comment, so later maintainer have the origin source at hand.

  1. Can this problem be addressed by introducing a check task in the build.sc file that runs before the compile task?

A check task would be nice since it allows user some customization. To be helpful, the warning is show close to a potential compilation error, which we can't guarantee if it's a separate task though. You could let this task return some message, which you also append to any potentially error message from the compile task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue The fix/solution for the issue is considered easy. A good starting point for newbies.
Projects
None yet
Development

No branches or pull requests

2 participants