git clone [email protected]:perok/workshop-programs-as-values.git
- Open in editor of choice :) and setup for Scala
- Get started
Run ./development.sh
in a new terminal. On success, you will be presented with VITE
(js build tool) telling you to visit an url.
This site will be the interactive results of your code changes (reloads on successful code changes). After doing code changes the output and potential compiler
errors will be shown in the terminal window. It is recommended to have this easily viewable.
Now, all the code changes will be in this file. Get cracking!
Some potentially helpful resources:
- Docs for Scala the language (API docs)
- Docs for cats the fp standard library (API docs)
- Docs for cats-effect the effect system (API docs)
- Docs for fs2 the functional streams library (API docs)
- Use devcontainers in VSCode
- Note: Open browser to loalhost:5173. On successfull code changes the browser window must reload.
Use either Intellij or VSCode:
- For Intellij:
- Ensure that
Scala
plugin is installed - Recommended: Format on save https://scalameta.org/scalafmt/docs/installation.html#format-on-save
- Ensure that
- For VSCode
- Install metals plugin https://scalameta.org/metals/docs/editors/vscode#installation
- Recommended: format on save https://stackoverflow.com/a/54665086
- Getting errors like the following in
sbt shell
window? Then use the terminal and runsbt
directly.
[error] stack trace is suppressed; run last frontend / frontendInstall for the full output
[error] (frontend / frontendInstall) java.io.IOException: Cannot run program "npm" (in directory "/home/perok/dev/bekk/faggruppe-fp2021/workshop-scala/modules/frontend"): error=2, No such file or directory
[error] Total time: 0 s, completed 20. nov. 2021, 11:58:44
- The
./development.sh
script will fail when you start it if there are compilation issues. This is only a problem at startup.