Skip to content

Explain version choice on download page #1791

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion _layouts/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ <h2>Install Scala with <span style="font-weight: bold;">cs setup</span> (recomme
</a>
</div>
</div>
<h2>Other ways to install Scala</h2>

<div id="version-choice">
<h2>Which version of Scala should I choose?</h2>
<p>There are 2 distribution lines of Scala 3:</p>
<ul>
<li><strong>Scala Next</strong> - The <strong>default</strong> to be used by most users, containing the latest features, bug fixes and improvements.</li>
Copy link
Member

Choose a reason for hiding this comment

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

this perhaps can display the current LTS/Next version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea, I'm not sure how to implement it with this templating engine though 😞

Copy link
Member

@bishabosha bishabosha Apr 17, 2025

Choose a reason for hiding this comment

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

its using jekyll for templating, (like ruby, variables magically exist when you define them)

maybe you can look at this snippet (how the frontpage renders the lts and next releases) which loops through all the "current releases" and then when it sees the right release assigns it to the appropriate variable, then you can splice later with {{scala_lts_version}}

{% for release in site.data.scala-releases %}
{% assign version_slice = release.version | slice: 0, 2 %}
{% if release.category == 'current_version' %}
{% if version_slice == '3.' %}
{% unless release.title contains "LTS" %}
{% assign scala_next_release = release %}
{% endunless %}
{% if release.title contains "LTS" %}
{% assign scala_lts_release = release %}
{% endif %}
{% else %}
{% assign scala_2_version = release.version %}
{% endif %}
{% endif %}
{% endfor %}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you Jamie, that helped! the updated layout renders version numbers as on this screenshot:

obraz

@lrytz it also removes the sethian parentheses 😉

Copy link
Member

Choose a reason for hiding this comment

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

nice!

<li><strong>Scala LTS</strong> - Advised to be used for publishing <strong>libraries</strong>. (Some especially conservative users might also choose it over Scala Next.)</li>
Copy link
Member

Choose a reason for hiding this comment

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

Mabye without the sethian parentheses?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good to me

Suggested change
<li><strong>Scala LTS</strong> - Advised to be used for publishing <strong>libraries</strong>. (Some especially conservative users might also choose it over Scala Next.)</li>
<li><strong>Scala LTS</strong> - Advised to be used for publishing <strong>libraries</strong>.</li>

</ul>
</div>

<h2>Other ways to install Scala</h2>
<div class="wrap">
<a href="{{ site.baseurl }}/download/all.html" class="btn-download dl-find-all">
<i class="fa fa-list-ul"></i>
Expand Down