Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I code in Dotty in German (or at all) in IntelliJ?

Suspicious that at least a part of this post might be an April Fool's joke, I set about installing Dotty on my Linux laptop and was pleased and surprised to discover that it seems to be completely straight - I was able to get the Fibonacci function as given in German working fine from the REPL.

Now I want to code in Dotty/Scala in German in the IntelliJ IDE, but have not so far managed to achieve this, or for that matter English Language 'Hello World' for which will the Dotty compile fails with an SBT error, see below (there are no errors in the IntelliJ code window for the object).

Opening a new Dotty project via the IntelliJ new project dialogue puts a new instance of Dotty in my .ivy2 directory, distinct from that I use in the REPL. I have found Felix Mulder's Dotty plugin but I'm not sure how to use a plugin from source. After the project has set itself up:

  1. German keywords are not recognised in any new Scala file I create in src > main.
  2. In build.sbt some operators and keywords are not recognised
  3. In build.sbt each entry gives the error Expression Def.Setting[SomeType] must conform to DslEntry in SBT file
  4. I get this error log warning (twice):

    Binary version (0.1.1-20170410-0bd7821-NIGHTLY) for dependency ch.epfl.lamp#scala-library;0.1.1-20170410-0bd7821-NIGHTLY in default#skala_2.11;0.1-SNAPSHOT differs from Scala binary version in project (2.11).

which I think might be a consequence of the skala and dotty paths in my PATH environment variable.

Searching on the error message in point 3 led me here: I can switch to an unbundled SBT I know to be good easily enough, but HW will still not compile, instead giving a quite lengthy SBT error.

Unfortunately I don't understand the syntax of the entries in build.sbt well enough to change them according to the advice of murmelssonic. If I just have to learn that then OK, I'm sure I can.

I believe I have read posts which suggest that the build.sbt errors can be ignored as they do not actually lead to compile errors, but I can't confirm this as I can't compile anything yet. Even if this be true, I want to eliminate these, the better not to obscure legitimate warnings and errors.

My question might be better expresses as simply "How do I install the Dotty plugin for IntelliJ?", but I'm not sure that's the complete solution to this collection of symptoms.

System info:

  • OS Kubuntu 16.10
  • Java 1.8_121
  • IntelliJ 2017.1
  • Dotty v0.1.1-20170410
  • SBT 0.13.13 and 0.13.15 (each attempted) via IntellliJ dialogue
  • SBT 0.1-SNAPSHOT (from sbt version on command line in sbt dir, used by changing IntelliJ settings).
like image 916
Mark Avatar asked Apr 11 '17 14:04

Mark


1 Answers

While Skala is a natural development for the Scala language, seeing how its creator Martin Odersky is a German and should have implemented German keywords in the first place, JetBrains is a company founded by Russians. As such, we are committed to exporting cyrillic keywords into the world of programming.

In a way, IntelliJ-Scala is already an alternative compiler for the Scala programming language specification. This will be increasingly true with the release of the all-new Скала plugin for IntelliJ!

This is a totally official statement by the IntelliJ-Скала team's only German member.

like image 194
Justin Kaeser Avatar answered Oct 16 '22 18:10

Justin Kaeser