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

Improve documentation on selecting a Scala version #1593

Open
lexspoon opened this issue Jul 26, 2024 · 1 comment
Open

Improve documentation on selecting a Scala version #1593

lexspoon opened this issue Jul 26, 2024 · 1 comment

Comments

@lexspoon
Copy link

I am trying to upgrade from 2.12.18 to 2.12.19, and the docs are very unclear about how to do this. If you start at Selecting Scala version, you get two pieces of information:

  • How to configure using scala_config, but this only works for a very limited set of version numbers. At the time of writing, the only choices are one version from 2.11.x, one version from 2.12.x, and one version from 2.13.x. As such, this option does not work for what I want to do.
  • How to configure multiple versions. I don't want multiple versions, though. So this option doesn't work, either.

I am filing an issue to request specific documentation on how to choose a Scala version in the cases that scala_config doesn't already have support for it.

This is a huge usability issue for something that seems like it is probably pretty simple once it is understood how to do it. Two of the top engineers at my company have spent hours, now, and are still digging around. I realize there are issues with expanding scala_config for more versions, but let us not make the perfect the enemy of the good. Can the maintainers document the correct way to update your WORKSPACE file for a different Scala version, with as few assumptions as possible that the reader knows the ins and outs of Bazel? It seems like it should be a chunk of WORKSPACE plus a few SHAs; it would be helpful to see the chunk of configuration and then directions on where to get the SHAs.

@lexspoon
Copy link
Author

lexspoon commented Jul 26, 2024

After going through this process, now, I think it may be better to update the "Getting started" guide to go ahead and show people how to set themselves up using setup_scala_toolchain rather than scala_register_toolchains.

It's a little more code for your WORKSPACE and BUILD files, and it assumes that you have Maven set up in your build, already. However, everyone using Scala is likely to be using Maven, anyway, so that shouldn't matter. Also, the little bit more code is mostly copy-pasted, and it comes at the large benefit of not putting limits on things like setting your default scalac options or setting your default unused deps checker mode.

Still, whatever the maintainers wish to do, I request making the docs much clearer about how to choose a Scala version that is not one of the very few versions that are supported out of the box.

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

No branches or pull requests

1 participant