profile
viewpoint

ritschwumm/commonist 10

A file upload tool for mediawiki using its api.php interface

ritschwumm/jackdaw 2

a 3-deck dj tool written in scala

ritschwumm/disposer 1

try-with-resources in scala

ritschwumm/jkeyfinder 1

a stripped-down reimplementation of libkeyfinder

ritschwumm/android-sdk-plugin 0

An easy-to-use sbt plugin for working with all Android projects

ritschwumm/articles 0

thoughts on programming

ritschwumm/AS 0

VCV Rack Modules

ritschwumm/better-files 0

Simple, safe and intuitive Scala I/O

ritschwumm/cbt 0

CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala

ritschwumm/csview 0

📠 A high performance csv viewer with cjk/emoji support.

startedbonsairobo/building-blocks

started time in a day

Pull request review commentsbt/sbt

Add wizard for installing sbtn and completions

+/*+ * sbt+ * Copyright 2011 - 2018, Lightbend, Inc.+ * Copyright 2008 - 2010, Mark Harrah+ * Licensed under Apache License 2.0 (see LICENSE)+ */++package sbt+package internal++import Def._+import Keys.{ sbtVersion, state, terminal }++import java.io.{ File, FileInputStream, FileOutputStream, InputStream, IOException }+import java.net.URL+import java.nio.file.{ Files, Path }+import java.util.zip.ZipInputStream+import sbt.io.IO+import sbt.io.Path.userHome+import sbt.io.syntax._+import scala.util.{ Properties, Try }++private[sbt] object InstallSbtn {+  private[sbt] val installSbtn =+    Def.inputKey[Unit]("install sbtn and tab completions").withRank(KeyRanks.BTask)+  private[sbt] def installSbtnImpl: Def.Initialize[InputTask[Unit]] = Def.inputTask {+    val inputVersion = Def.spaceDelimited("version").parsed.headOption+    val version = inputVersion.getOrElse(sbtVersion.value.replaceAllLiterally("-SNAPSHOT", ""))+    val term = terminal.value+    term.setMode(canonical = false, echo = false)+    val baseDirectory = BuildPaths.getGlobalBase(state.value).toPath+    val tmp = Files.createTempFile(s"sbt-$version", "zip")+    val sbtn = if (Properties.isWin) "sbtn.exe" else "sbtn"+    try extractSbtn(term, version, tmp, baseDirectory.resolve("bin").resolve(sbtn))+    finally {+      Files.deleteIfExists(tmp)+      ()+    }+    val shell = if (System.console != null) getShell(term) else "none"+    shell match {+      case "none" =>+      case s =>+        val completion = shellCompletions(s)+        val completionLocation = baseDirectory.resolve("completions").resolve(completion)+        downloadCompletion(completion, version, completionLocation)+        s match {+          case "bash"       => setupBash(baseDirectory, term)+          case "fish"       => setupFish(baseDirectory, term)+          case "zsh"        => setupZsh(baseDirectory, term)+          case "powershell" => setupPowershell(baseDirectory, term)+          case _            => // should be unreachable+        }+        val msg = s"Successfully installed sbtn for $s. You may need to restart $s for the " ++          "changes to take effect."+        term.printStream.println(msg)+    }+    ()+  }++  private[sbt] def extractSbtn(term: Terminal, version: String, sbtZip: Path, sbtn: Path): Unit = {+    downloadRelease(term, version, sbtZip)+    Files.createDirectories(sbtn.getParent)+    val bin =+      if (Properties.isWin) "pc-win32.exe"+      else if (Properties.isLinux) "pc-linux"+      else "apple-darwin"+    val sbtnName = s"sbt/bin/sbtn-x86_64-$bin"+    val fis = new FileInputStream(sbtZip.toFile)+    val zipInputStream = new ZipInputStream(fis)+    var foundBinary = false+    try {+      var entry = zipInputStream.getNextEntry+      while (entry != null) {+        if (entry.getName == sbtnName) {+          foundBinary = true+          term.printStream.println(s"extracting $sbtZip!$sbtnName to $sbtn")+          transfer(zipInputStream, sbtn)+          sbtn.toFile.setExecutable(true)+          entry = null+        } else {+          entry = zipInputStream.getNextEntry+        }+      }+      if (!foundBinary) throw new IllegalStateException(s"couldn't find $sbtnName in $sbtZip")+    } finally {+      fis.close()+      zipInputStream.close()+    }+    ()+  }+  private[this] def downloadRelease(term: Terminal, version: String, location: Path): Unit = {+    val zip = s"https://github.com/sbt/sbt/releases/download/v$version/sbt-$version.zip"+    val url = new URL(zip)+    term.printStream.println(s"downloading $zip to $location")+    transfer(url.openStream(), location)+  }+  private[this] def transfer(inputStream: InputStream, path: Path): Unit = {+    val os = new FileOutputStream(path.toFile)

is it a problem the InpuStream is never closed when this throws an exception?

eatkins

comment created time in 3 days

PullRequestReviewEvent

Pull request review commentsbt/sbt

Add wizard for installing sbtn and completions

+/*+ * sbt+ * Copyright 2011 - 2018, Lightbend, Inc.+ * Copyright 2008 - 2010, Mark Harrah+ * Licensed under Apache License 2.0 (see LICENSE)+ */++package sbt+package internal++import Def._+import Keys.{ sbtVersion, state, terminal }++import java.io.{ File, FileInputStream, FileOutputStream, InputStream, IOException }+import java.net.URL+import java.nio.file.{ Files, Path }+import java.util.zip.ZipInputStream+import sbt.io.IO+import sbt.io.Path.userHome+import sbt.io.syntax._+import scala.util.{ Properties, Try }++private[sbt] object InstallSbtn {+  private[sbt] val installSbtn =+    Def.inputKey[Unit]("install sbtn and tab completions").withRank(KeyRanks.BTask)+  private[sbt] def installSbtnImpl: Def.Initialize[InputTask[Unit]] = Def.inputTask {+    val inputVersion = Def.spaceDelimited("version").parsed.headOption+    val version = inputVersion.getOrElse(sbtVersion.value.replaceAllLiterally("-SNAPSHOT", ""))+    val term = terminal.value+    term.setMode(canonical = false, echo = false)+    val baseDirectory = BuildPaths.getGlobalBase(state.value).toPath+    val tmp = Files.createTempFile(s"sbt-$version", "zip")+    val sbtn = if (Properties.isWin) "sbtn.exe" else "sbtn"+    try extractSbtn(term, version, tmp, baseDirectory.resolve("bin").resolve(sbtn))+    finally {+      Files.deleteIfExists(tmp)+      ()+    }+    val shell = if (System.console != null) getShell(term) else "none"+    shell match {+      case "none" =>+      case s =>+        val completion = shellCompletions(s)+        val completionLocation = baseDirectory.resolve("completions").resolve(completion)+        downloadCompletion(completion, version, completionLocation)+        s match {+          case "bash"       => setupBash(baseDirectory, term)+          case "fish"       => setupFish(baseDirectory, term)+          case "zsh"        => setupZsh(baseDirectory, term)+          case "powershell" => setupPowershell(baseDirectory, term)+          case _            => // should be unreachable+        }+        val msg = s"Successfully installed sbtn for $s. You may need to restart $s for the " ++          "changes to take effect."+        term.printStream.println(msg)+    }+    ()+  }++  private[sbt] def extractSbtn(term: Terminal, version: String, sbtZip: Path, sbtn: Path): Unit = {+    downloadRelease(term, version, sbtZip)+    Files.createDirectories(sbtn.getParent)+    val bin =+      if (Properties.isWin) "pc-win32.exe"+      else if (Properties.isLinux) "pc-linux"+      else "apple-darwin"+    val sbtnName = s"sbt/bin/sbtn-x86_64-$bin"+    val fis = new FileInputStream(sbtZip.toFile)+    val zipInputStream = new ZipInputStream(fis)+    var foundBinary = false+    try {+      var entry = zipInputStream.getNextEntry+      while (entry != null) {+        if (entry.getName == sbtnName) {+          foundBinary = true+          term.printStream.println(s"extracting $sbtZip!$sbtnName to $sbtn")+          transfer(zipInputStream, sbtn)+          sbtn.toFile.setExecutable(true)+          entry = null+        } else {+          entry = zipInputStream.getNextEntry+        }+      }+      if (!foundBinary) throw new IllegalStateException(s"couldn't find $sbtnName in $sbtZip")+    } finally {+      fis.close()+      zipInputStream.close()+    }+    ()+  }+  private[this] def downloadRelease(term: Terminal, version: String, location: Path): Unit = {+    val zip = s"https://github.com/sbt/sbt/releases/download/v$version/sbt-$version.zip"+    val url = new URL(zip)+    term.printStream.println(s"downloading $zip to $location")+    transfer(url.openStream(), location)+  }+  private[this] def transfer(inputStream: InputStream, path: Path): Unit = {+    val os = new FileOutputStream(path.toFile)+    val result = new Array[Byte](1024 * 1024)+    var bytesRead = -1+    try {+      do {+        bytesRead = inputStream.read(result)+        if (bytesRead > 0) os.write(result, 0, bytesRead)+      } while (bytesRead > 0)+    } finally {+      inputStream.close()

when this throws an exception, the next line is never executed, right?

eatkins

comment created time in 3 days

PullRequestReviewEvent

startedOscarSouth/theHarmonicAlgorithm

started time in 4 days

startedprabhuignoto/react-chrono

started time in 4 days

issue openedsbt/sbt

sbt 1.4.1: watchBeforeCommand is no longer executed in ~compile

steps

create a minimal project

// build.sbt
organization	:= "de.test"
version			:= "0.0.1"
name			:= "repro"
scalaVersion	:= "2.13.3"

watchBeforeCommand	:= { () =>
	println("WATCHBEFORE")
	watchBeforeCommand.value()
}
# project/build.properties
sbt.version=1.4.1
// src/main/Repro.scala
package repro

object Repro {
	def main(args:Array[String]):Unit	= {
		println("hallo")
	}
}

run ~sbt compile and change the print statement in object Repro

problem

WATCHBEFORE is not printed to the console before compilation starts

expectation

WATCHBEFORE is printed to the console before compilation starts, this worked in sbt 1.3.13

created time in 5 days

startedscala/scala-library-next

started time in 5 days

startedsimplex-chat/protocol

started time in 5 days

issue commentsbt/sbt

sbt 1.4.0/1.4.1 ~reStart with sbt-revolver requires "enter" key between "build triggered" and "compiling"

thanks @francisdb for trying out, it seems i missed a vital detail:

the problem only occurs when starting sbt like this ``~/Downloads/sbt/bin/sbt -Dsbt.log.noformat=true but does _not_ occur when starting it without the noformat property:~/Downloads/sbt/bin/sbt```

on a side note: while sbt is waiting for me to press enter, even ctrl-c does not kill the process any more

ritschwumm

comment created time in 5 days

issue closedsbt/sbt

lsp does not inform about resolved compilation issues, so problem markers stay in vscode

steps

  • install the vscode extension in vscode
  • open a scala file
  • introduce a syntax error
  • save
  • remove the syntax error
  • save again

problem

the problems view still shows the now outdated syntax error

expectation

the problem view does not show a problem marker where there is no problem

notes

sbt version:1.2.7

my impression is that the LSP never sends textDocument/publishDiagnostics messages when compilation issues are fixed, so vscode cannot know they are.

closed time in 5 days

ritschwumm

issue commentsbt/sbt

lsp does not inform about resolved compilation issues, so problem markers stay in vscode

this seems to work in sbt 1.4.1, except for files being deleted, see #5937

ritschwumm

comment created time in 5 days

issue openedsbt/sbt

sbt 1.4.0/1.4.1 ~reStart with sbt-revolver requires "enter" key between "build triggered" and "compiling"

steps

create a minimal project like this:

// build.sbt
organization := "de.test"
name := "repro"
version := "0.0.1"
scalaVersion := "2.13.3"
// project/plugins.sbt
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
# project/build.properties
sbt.version=1.4.1
// src/main/scala/Repro.scala
object Repro {
	def main(args:Array[String]):Unit	= {
		println("test")
	}
}

now start revolver with ~reStart (in my case, in the jEdit terminal where TERM=dumb, but a regular bash seems to behave in the same way). this compiles the code and prints "test" to the terminal.

now change the string printed in Repro.scala in your editor.

problem

when scala code is changed a line like this is printed [info] Build triggered by .../repro/src/main/scala/Repro.scala. Running 'reStart'

now i'd expect the compiler to run, and afterwards the Repro class to be stated. This does not happen, instead the build hangs until i press <RETURN>. when i do, i get the expected log output [info] compiling 1 Scala source to .../repro/target/scala-2.13/classes .. and everythign proceeds as in earlier sbt versions.

expectation

i'd expect sbt-revolver behave like it did before sbt 1.4

created time in 5 days

startedgelisam/klister

started time in 6 days

startedaugustjune/context-applied

started time in 7 days

startedtopshell-language/topshell

started time in 8 days

startednewren/git-filter-repo

started time in 11 days

startedlloydmeta/slim-play

started time in 11 days

startedkmatheussen/radium

started time in 13 days

created tagritschwumm/sjs-dom-builder

tagv-0.10.0

macro experiment for convenient scala-js dom element construction

created time in 13 days

push eventritschwumm/sjs-dom-builder

Herr Ritschwumm

commit sha b2f6a4cbe01a0d7fefaec182d84257b82298920b

update dependencies, sbt 1.3.13, scalajs-1.3.0

view details

push time in 13 days

created tagritschwumm/sjs-dom-builder

tagv-0.9.0

macro experiment for convenient scala-js dom element construction

created time in 13 days

created tagritschwumm/sjs-dom-builder

tagv-0.8.0

macro experiment for convenient scala-js dom element construction

created time in 13 days

push eventritschwumm/sjs-dom-builder

Herr Ritschwumm

commit sha 16a47933d182120586e9eec76379b169b6a59f38

gitignore private.sbt

view details

Herr Ritschwumm

commit sha a3e3d9dd84440ac4deee3fce9ab2d9a481008053

scala 2.13.2, sbt 1.3.10, scala-js 1.1.0

view details

Herr Ritschwumm

commit sha 40443535d3e64a672a0d5f0f1a94199df0cf1221

scala 2.13.3, sbt 1.3.12

view details

push time in 13 days

push eventritschwumm/sjs-diffless

Herr Ritschwumm

commit sha 52ee2cb56323091239c0f10ae371b9e6218ee9c9

scala 2.13.3, sbt 1.3.12, fix linter errors

view details

Herr Ritschwumm

commit sha b1f5acb3f5e435e44dcbbe39344b8d6ea37cff3d

update scalajs-dom, clarify event flow, sbt 1.3.13, scala-js 1.1.1

view details

Herr Ritschwumm

commit sha 13c87c4338eeb11b070046f45b9ff181f3347d64

scala-js 1.3.0

view details

push time in 13 days

push eventritschwumm/scwebapp

Herr Ritschwumm

commit sha 808f6c53873c38cb2f52ca6ece5553fa5b42ed01

scala 2.13.3, sbt 1.3.12, fix linter errors

view details

Herr Ritschwumm

commit sha 972ec7ad359099ae6d232410fffd16ac287563c4

update dependencies, allow a charset parameter for basic authentication, sbt 1.3.13

view details

Herr Ritschwumm

commit sha 25e08932eb144805e46c693702a4096291a35d72

update dependencies

view details

Herr Ritschwumm

commit sha edf2ba08ff389c18de4f034a2240bad14bed36ab

update dependencies

view details

Herr Ritschwumm

commit sha 8b6427ea347a703f905c4fcf10a73d3d65055c43

update dependencies

view details

push time in 13 days

push eventritschwumm/screact

Herr Ritschwumm

commit sha 1a1e806381058ebcacab8f3ca7d4387fa88b7e1b

scala 2.13.3, sbt 1.3.12, update dependencies, fix linter errors

view details

Herr Ritschwumm

commit sha 0aec149e62e52b73b721e709ccc2dc466c09d26a

sbt 1.3.13, update dependencies

view details

Herr Ritschwumm

commit sha 98fdea44ba1757a860c5fd84fbfed6d6f2658670

update dependencies

view details

Herr Ritschwumm

commit sha 6db8726512be2c74e58c58f08bbdcb5024b6fa72

update dependencies, adapt code

view details

Herr Ritschwumm

commit sha 0453ca0b4c981e47dbc3f2b4019978cea60eb4ea

update dependencies

view details

push time in 13 days

push eventritschwumm/scparse

Herr Ritschwumm

commit sha 0d4cbdf7a7f8d2a301987d95a216ad02719b269b

scala 2.13.3, sbt 1.3.12, update dependencies, fix linter errors

view details

Herr Ritschwumm

commit sha 31cdea87ca62f7ce9b149bf78b1d6326d95c1bd7

sbt 1.3.13, update dependencies

view details

Herr Ritschwumm

commit sha 36b06d4b936f9cd2a65350f092681e8e98e3c41c

update dependencies

view details

Herr Ritschwumm

commit sha b1edea2ed25d486e8b1dcee13828431ba8ca5df9

update dependencies

view details

Herr Ritschwumm

commit sha 1f0d0e44b181bc1281d80b2d3d863404a7fcae41

scala-js 1.3.0, update dependencies

view details

push time in 13 days

push eventritschwumm/scjson

Herr Ritschwumm

commit sha 5ea238b3c06ffd5353bd9b16de1bca7535cff95e

scala 2.13.3, update dependencies, fix linter errors, sbt 1.3.12

view details

Herr Ritschwumm

commit sha 6b8eff13e07d67f3b67dda48462088006181d065

sbt 1.3.13, update dependencies

view details

Herr Ritschwumm

commit sha 08f37e56d472bdd38c6707b057f85f213b644d18

update dependencies

view details

Herr Ritschwumm

commit sha 8a6e862b1af7c99d9a150b88d0b1f5b191ffe5b0

update dependencies

view details

Herr Ritschwumm

commit sha 431d753780846c86deebb76d5b472b25b30d70a7

update dependencies

view details

push time in 13 days

created tagritschwumm/scgeom

tagv-0.45.0

An alternative to swing's geometry classes

created time in 13 days

push eventritschwumm/scgeom

Herr Ritschwumm

commit sha dcbca86c3bdcbd89bdb8016beeec3206816940fd

gitignore private.sbt

view details

Herr Ritschwumm

commit sha 43d49e54be297d998f533836055f47ac131aba21

scala 2.13.3, sbt 1.3.12, update dependencies, format, fix linter errors

view details

push time in 13 days

push eventritschwumm/scbson

Herr Ritschwumm

commit sha f2a182fef1610baae7e82f46220b5c3e4280b5d1

scala 2.13.3, update dependencies, sbt 1.3.12

view details

Herr Ritschwumm

commit sha 56f2a53f5301319d8160002ad2710e757104c9b3

sbt 1.3.13, update dependencies

view details

Herr Ritschwumm

commit sha 4c3ae4c630d437157c60a7d6be52fcfbede1097e

update dependencies

view details

Herr Ritschwumm

commit sha 8eb7de82e52b94affba4e93610f6f02b010b34de

update dependencies

view details

Herr Ritschwumm

commit sha 2dcfbe80fcd1c0c3b029b31d86d6645d9437fe5b

update dependencies

view details

push time in 13 days

push eventritschwumm/scaudio

Herr Ritschwumm

commit sha ae4120074f2609daab3c45706474be1a2ac137bc

scala 2.13.3, sbt 1.3.12, fix linter errors

view details

Herr Ritschwumm

commit sha c3a5fa91b25fd92a0642309b885384c0537e1600

sbt 1.3.13, update dependencies

view details

Herr Ritschwumm

commit sha 7d8385375e25799745efaef2fbc39d052b5657a6

update dependencies

view details

Herr Ritschwumm

commit sha 69b237abc3ea6242dca1551e57311e9e496354a1

update dependencies

view details

Herr Ritschwumm

commit sha 892c7f9337be02beca705cda49504b827dee01bd

update dependencies

view details

push time in 13 days

created tagritschwumm/sc2d

tagv-0.34.0

Simple java 2D painting for custom components

created time in 13 days

push eventritschwumm/sc2d

Herr Ritschwumm

commit sha d5d650adc0afe2c5a4d1d7b05aaf9c05c0ab4550

gitignore private.sbt

view details

Herr Ritschwumm

commit sha 39a686d1baab72a5c2049e9215808157690d3d35

scala 2.13.3, sbt 1.3.12, fix linter errors

view details

push time in 13 days

push eventritschwumm/rumms

Herr Ritschwumm

commit sha 6d2a8638ed079f103f1b4069604fc0840bb11ade

scala 2.13.3, sbt 1.3.12, update dependencies, fix linter errors

view details

Herr Ritschwumm

commit sha c9130df4ad33c0f1c46d25b098567816d30552e8

sbt 1.3.13, update dependencies

view details

Herr Ritschwumm

commit sha 1b1afc71aae33fb316fd5d28c0bce8a9c351be52

update dependencies, adapt code

view details

Herr Ritschwumm

commit sha 6b71c565c4f552ce551d368bf8db62305fc0f76e

update dependencies

view details

Herr Ritschwumm

commit sha c2ec0612f69b570e2389cc0cfa44fa182c665987

update dependencies

view details

push time in 13 days

push eventritschwumm/scutil

Herr Ritschwumm

commit sha f1b743529638ccf8caaf79db683dbd38c53c548b

update dependencies, scala 2.13.3, adapt formatting, add socket extensions, extend ByteString tools

view details

Herr Ritschwumm

commit sha f3972e4e6fcebc2bd3dbf7160a446544ae5a63b7

update dependencies, rename Applicative methods, rename delayPure to delay and pureUnit to unit, extend Applicative, move first and second from MonadSyntax to ApplicativeSyntax, extend Resource for multiple values, extend Semigroup, sbt 1.3.13

view details

Herr Ritschwumm

commit sha 288f57f01283126466bc8cc2c006476aadc2e769

update dependencies, make IoRef into an effect-generic AtomicRef, remove deprecated methods, rework time conversion, add Resoirce for Destroyable

view details

Herr Ritschwumm

commit sha 3d7bf7ab88d3deec7d4e3887c8e84558658352aa

split FLoatingPointUtil into FloatUtil and DoubleUtil, get rid of the global disposable function, add Using monad, remove deprecated code

view details

Herr Ritschwumm

commit sha 864cbef8e1274a6d01c3c48b617d0b6402851c94

update dependencies, add Using.foreach, move standard Optics into companion objects, clarify security stuff throwing exceptions

view details

push time in 13 days

startedHoerTech-gGmbH/Cape4all

started time in 13 days

starteddevelopit/htm

started time in 14 days

startedtheyamo/CheeseCutter

started time in 14 days

PR closed sixtyfpsui/sixtyfps

fix typos
+7 -7

3 comments

1 changed file

ritschwumm

pr closed time in 15 days

pull request commentsixtyfpsui/sixtyfps

fix typos

oh sorry, i missed the CLA requirement. i'm not willing to sign a contract to be allowed to fix typos.

ritschwumm

comment created time in 15 days

PR opened sixtyfpsui/sixtyfps

fix typos
+7 -7

0 comment

1 changed file

pr created time in 15 days

push eventritschwumm/sixtyfps

ritschwumm

commit sha ffc22447738a83b0aa37ab0025f2a9467b83c489

fix typos

view details

push time in 15 days

push eventritschwumm/sixtyfps

ritschwumm

commit sha a9e0418e55c8785402d6c9e566cb85973ba53246

fix typos

view details

push time in 15 days

push eventritschwumm/sixtyfps

ritschwumm

commit sha de94cd33d2066375109d8358780a6313df1e5ab6

fix typo

view details

push time in 15 days

fork ritschwumm/sixtyfps

SixtyFPS is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript.

https://sixtyfps.io

fork in 15 days

startedsixtyfpsui/sixtyfps

started time in 15 days

issue commentscalameta/metals

Running / Debugging doesnt work when connected to a VPN

0.0.0.0 means all ip addresses on the local machine, which essentially means my colleague on the next desk should have the same kind of access as i do. questionable, if you ask me.

jahan01

comment created time in 15 days

startedzrythm/zrythm

started time in 18 days

startedscalag/scalag

started time in 18 days

startedjatinchowdhury18/ChowDSP-VCV

started time in 18 days

startedvalskalla/odin

started time in 18 days

startedChristopherDavenport/cats-time

started time in 20 days

issue commentDuhemm/sbt-errors-summary

Plugin fails with sbt `1.4.0`

see https://github.com/sbt/sbt/issues/5935

cipriansofronia

comment created time in 20 days

issue commentsbt/sbt

sbt 1.4.0: BSP does not report about compilation errors resolved by deleting an offending file

i agree it would be a bit weird to send diagnostics for a file that does not exists.

on the other hand: as the part of the client displaying compilation errors, i'm mostly interested in maintaining a complete list of currently relevant compilation errors (and warnings). the files themselves i don't care too much about.

how about, instead of sending diagnostics, just telling the client when a file that was relevant in a previous compilation is now gone, so i can just remove all errors concerning this file? the only other alternative i could see is keep a list of files and then manually check (from time to time? when exactly?) which of these still exist.

ritschwumm

comment created time in 20 days

issue commentsbt/sbt

sbt 1.4.0: prompt is missing in the jEdit console on ubuntu

that was quick. thanks a lot, @eatkins and @eed3si9n !

ritschwumm

comment created time in 21 days

issue openedsbt/sbt

sbt 1.4.0: BSP does not report about compilation errors resolved by deleting an offending file

steps

  • run sbt ~compile in an existing project
  • connect to the bsp socket and print messages
  • create a new scala file containing some invalid syntax
  • see the errors being reported in BSP
  • delete the bad scala file, thus resolving the compilation error

problem

there are no PublishDiagnostics message in BSP for the deleted file, so the BSP client does not know the compilation error has been resolver

expectation

diagnostics are published in a way a client can remove compilation errors when they no longer exist

notes

created time in 23 days

issue openedsbt/sbt

sbt 1.4.0: prompt is missing in the jEdit console on ubuntu

steps

run bin/sbt from inside the jEdit console

problem

sbt starts normally and runs until this log message [info] sbt server started at local but does not display a prompt at all

expectation

sbt should display a prompt

notes

typing commands does start them, command output is visible. just the prompt is missing. jEdit reports $TERM to be dumb

created time in 23 days

issue openedsbt/sbt

sbt 1.4.0: setting a custom xsbti.Reporter for compilerReporter leads to a MatchError

steps

set compilerReporter to a custom implementation of xsbti.Reporter

problem

because the custom Reporter is not an instance of BuildServerReporter, https://github.com/sbt/sbt/blob/develop/main/src/main/scala/sbt/Defaults.scala#L2147 produces a MatchError. https://github.com/sbt/sbt/blob/develop/main/src/main/scala/sbt/Defaults.scala#L2118 probably does, too

expectation

using a custom reporter should work as before

notes

i used this for a nasty hack where the custom reporter (after messaging my editor) forwarded all calls to the original reporter. this cannot be made to work correctly any more, because sendFinalReport is not a part of the Reporter interface, and cannot even be overridden in a subclass of BuildServerReporter because it's private[sbt] there.

created time in 23 days

startedcreativeintent/temper

started time in a month

startedkeur/prettyeq

started time in a month

startedggerganov/wave-share

started time in a month

startedbellard/quickjs

started time in a month

startedelsaland/elsa

started time in a month

issue commentscala-native/scala-native

fromCString(null) returns java.lang.RuntimeException not NullPointerException

how is Option(fromCString(cstr)).map(str => ...) better than Option(cstr).map(fromCString)? i don't see how it's a good idea to hide a possible bug by passing on a null value instead of dealing with null values as early as possible.

LeeTibbert

comment created time in a month

startedantonok-edm/ampli-Fe

started time in a month

startedjoshua-maros/audiobench

started time in a month

startedJohnsProject/JPGE

started time in a month

startedrssh/dotty-cps-async

started time in a month

startedolynch/Catlab.jl

started time in a month

startedkarlstav/cava

started time in a month

PR opened joshscurtis/jspect

fix typo in comment
+1 -1

0 comment

1 changed file

pr created time in a month

push eventritschwumm/jspect

ritschwumm

commit sha b4834a38c041f9a8a65a0a6fe19c8560ccb05e1b

fix typo in comment

view details

push time in a month

fork ritschwumm/jspect

Java Swing Audio Spectrum Analyzer

fork in a month

CommitCommentEvent

startedbaowenbo/DAIN

started time in a month

PR opened wfxr/csview

i guess this is a typo
+1 -1

0 comment

1 changed file

pr created time in a month

push eventritschwumm/csview

ritschwumm

commit sha a42602c31e8aae294f0731baaafaf229867a8e1c

i guess this is a typo

view details

push time in a month

fork ritschwumm/csview

📠 A high performance csv viewer with cjk/emoji support.

https://github.com/wfxr/csview

fork in a month

issue commentJorenSix/TarsosDSP

AudioFloatConversion16 littleEndian conversion issue

if you ask me, using a conversion factor of 32767 is problematic anyway: 16 bit signed can represent values within [-32768,+32767], and i'd expect audio signals represented as a floating point value to stay within [-1,+1]. -32768.0 / 32767.0 is smaller than -1.0, though..

89iuv

comment created time in a month

issue commentJorenSix/TarsosDSP

AudioFloatConversion16 littleEndian conversion issue

sounds like a rounding issue to me - i'd guess if https://github.com/JorenSix/TarsosDSP/blob/master/src/core/be/tarsos/dsp/io/TarsosDSPAudioFloatConverter.java#L400 and https://github.com/JorenSix/TarsosDSP/blob/master/src/core/be/tarsos/dsp/io/TarsosDSPAudioFloatConverter.java#L411 used a conversion factor of 32768 instead of 32767, this would work as expected

89iuv

comment created time in a month

PR opened squinkylabs/SquinkyVCV

fix typo in comment
+1 -1

0 comment

1 changed file

pr created time in a month

push eventritschwumm/SquinkyVCV

ritschwumm

commit sha c18d5ea59ea187626705dd6648fdc717e9e4b2f2

fix typo in comment

view details

push time in a month

fork ritschwumm/SquinkyVCV

Virtual synthesizer modules for VCV Rack

fork in a month

issue commentcoursier/coursier

cs setup on mac fails to write in .bash_profile with AccessDeniedException

could it be the owner of the .bash_profile was some other user? that would explain why making it world-writable helped where making it writable fof the owner didn't.

smarter

comment created time in a month

startedsezanzeb/alsa-control

started time in a month

startedi-rinat/apulse

started time in a month

startedagraef/purr-data

started time in 2 months

Pull request review commentscala-js/scala-js

Add load, list, store, and save to java.util.Properties

 class Properties(protected val defaults: Properties)       defaults.foreachAncestor(f)   } -  // def list(out: PrintStream): Unit-  // def list(out: PrintWriter): Unit+  private final val listStr = "-- listing properties --"++  private def format(entry: ju.Map.Entry[AnyRef, AnyRef]): String = {+    val key: String   = entry.getKey().asInstanceOf[String]+    val value: String = entry.getValue().asInstanceOf[String]+    if (key.length > 40)+      s"${key.substring(0, 37)}...=$value"+    else+      s"$key=$value"+  }++  def list(out: PrintStream): Unit = {+    out.println(listStr)+    entrySet().scalaOps.foreach { entry => out.println(format(entry)) }+  }++  def list(out: PrintWriter): Unit = {+    out.println(listStr)+    entrySet().scalaOps.foreach { entry => out.println(format(entry)) }+  }++    private def loadImpl(reader: Reader): Unit = {+    import java.util.regex._+    val trailingBackspace = Pattern.compile("""(\\)+$""")+    val br                = new BufferedReader(reader)+    val valBuf            = new jl.StringBuilder()+    var prevValueContinue = false+    var isKeyParsed       = false+    var key: String       = null+    var line: String      = null++    while ({ line = br.readLine(); line != null }) {+      var i: Int   = -1+      var ch: Char = Char.MinValue++      def getNextChar(): Char = {+        i += 1+        // avoid out of bounds if value is empty+        if (i < line.length())

this format is dangerous in refactorings - i'd put {} around the branches or put them in the same line as the if and else (the latter might frowned upon here)

ekrich

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentscala-js/scala-js

Add load, list, store, and save to java.util.Properties

 class Properties(protected val defaults: Properties)       defaults.foreachAncestor(f)   } -  // def list(out: PrintStream): Unit-  // def list(out: PrintWriter): Unit+  private final val listStr = "-- listing properties --"++  private def format(entry: ju.Map.Entry[AnyRef, AnyRef]): String = {+    val key: String   = entry.getKey().asInstanceOf[String]+    val value: String = entry.getValue().asInstanceOf[String]+    if (key.length > 40)+      s"${key.substring(0, 37)}...=$value"+    else+      s"$key=$value"+  }++  def list(out: PrintStream): Unit = {+    out.println(listStr)+    entrySet().scalaOps.foreach { entry => out.println(format(entry)) }+  }++  def list(out: PrintWriter): Unit = {+    out.println(listStr)+    entrySet().scalaOps.foreach { entry => out.println(format(entry)) }+  }++    private def loadImpl(reader: Reader): Unit = {

bad indent

ekrich

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentscala-js/scala-js

Add load, list, store, and save to java.util.Properties

 class Properties(protected val defaults: Properties)   def setProperty(key: String, value: String): AnyRef =     put(key, value) -  // def load(reader: Reader): Unit-  // def load(inStream: InputStream): Unit-  // @deprecated("", "") def save(out: OutputStream, comments: String): Unit-  // def store(writer: Writer, comments: String): Unit-  // def store(out: OutputStream, comments: String): Unit+  def load(reader: Reader): Unit =+    loadImpl(reader)++  def load(inStream: InputStream): Unit = {+    loadImpl(new InputStreamReader(inStream, StandardCharsets.ISO_8859_1))+  }++  @deprecated("", "")

this could be a little bit more specific :)

ekrich

comment created time in 2 months

PullRequestReviewEvent

startedAcheronVM/acheronvm

started time in 2 months

PR opened Dobiasd/articles

fix typo
+1 -1

0 comment

1 changed file

pr created time in 2 months

push eventritschwumm/articles

ritschwumm

commit sha c66463d4d0c9f37a83bd1490bb68488409452bdb

fix typo

view details

push time in 2 months

fork ritschwumm/articles

thoughts on programming

fork in 2 months

more