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

Some doc updates #1112

Merged
merged 3 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN curl -fLo cs https://git.io/coursier-cli-linux &&\
bloop \
cs \
sbt-launcher \
scala:2.13.2 \
scala:2.13.10 \
scalafmt:2.5.3 &&\
./cs fetch org.scalameta::metals:0.9.0 >/dev/null &&\
./cs fetch org.scala-sbt:sbt:1.3.13 >/dev/null &&\
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dockerfile with support for creating images with kernels for multiple Scala versions.
# Expects ALMOND_VERSION and SCALA_VERSIONS to be set as build arg, like this:
# docker build --build-arg ALMOND_VERSION=0.3.1 --build-arg SCALA_VERSIONS="2.12.9 2.13.0" .
# docker build --build-arg ALMOND_VERSION=0.13.11 --build-arg SCALA_VERSIONS="2.12.17 2.13.10" .

# Set LOCAL_IVY=yes to have the contents of ivy-local copied into the image.
# Can be used to create an image with a locally built almond that isn't on maven central yet.
Expand Down Expand Up @@ -36,7 +36,7 @@ FROM coursier_base as local_ivy_no
FROM local_ivy_${LOCAL_IVY}
ARG ALMOND_VERSION
# Set to a single Scala version string or list of Scala versions separated by a space.
# i.e SCALA_VERSIONS="2.12.9 2.13.0"
# i.e SCALA_VERSIONS="2.12.17 2.13.10"
ARG SCALA_VERSIONS
USER $NB_UID
COPY scripts/install-kernels.sh .
Expand Down
31 changes: 31 additions & 0 deletions docs/pages/dev-from-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,34 @@ Optionally, you can pass a glob to filter notebook names:
```text
$ ./mill -i validateExamples 'scalapy*'
```

### Generate Metals configuration files

It is recommended to generate Metals configuration files manually, rather
than letting Metals load the project itself. In order to do that, run
```text
$ ./mill mill.contrib.Bloop/install
```

If you're using Metals from VSCode, you can then run the
"Metals: Connect to build server" command to take into account the newly
generated files.

If the command above takes too long to run, comment out Scala versions in
`deps.sc`. If no 2.12 versions are left, also comment out the few 2.12-specific
projects in `build.sc` (look for `212` to find them). Same if no 2.13 versions
are left (look for `213` to spot 2.13-specific projects).

### Generate IntelliJ IDEA configuration files

It is recommended to [manually generate IntelliJ configuration files](https://com-lihaoyi.github.io/mill/mill/Intro_to_Mill.html#_intellij_support_legacy),
rather than letting IntelliJ load the project itself. In order to do that, run
```text
$ ./mill.scalalib.GenIdea/idea
alexarchambault marked this conversation as resolved.
Show resolved Hide resolved
```

You can then open the project in IntelliJ.
IntelliJ should also automatically pick those files when they are overwritten.

Just like for Metals above, you may benefit from disabling all but one Scala
version (see above for more details).
8 changes: 4 additions & 4 deletions docs/pages/install-multiple.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ for several Scala versions, or to test newer / former almond versions.
To install several version of the kernel side-by-side, just ensure the different installed versions
have different ids (required) and display names (recommended).

For example, let's install almond for the scala `2.13.0` version,
For example, let's install almond for the scala `2.13.10` version,
```bash
$ cs launch almond --scala 2.13.0 -- --install
$ cs launch almond --scala 2.13.10 -- --install
```

This installs almond with the default kernel id, `scala`, and default display name, "Scala".

Now let's *also* install almond for scala `2.12.9`,
Now let's *also* install almond for scala `2.12.17`,
```bash
$ cs launch almond:@VERSION@ --scala 2.12.9 \
$ cs launch almond:@VERSION@ --scala 2.12.17 \
-- --install --id scala212 --display-name "Scala (2.12)"
```

Expand Down