Skip to content

Instantly share code, notes, and snippets.

View jvican's full-sized avatar

Jorge jvican

View GitHub Profile
@jvican
jvican / frontend.json
Created June 15, 2019 09:51
An example of a real-world config file for one of the main bloop modules
{
"version" : "1.1.2",
"project" : {
"name" : "frontend",
"directory" : "/Users/jvican/Code/bloop/frontend",
"sources" : [
"/Users/jvican/Code/bloop/frontend/src/main/scala-2.12",
"/Users/jvican/Code/bloop/frontend/src/main/scala",
"/Users/jvican/Code/bloop/frontend/src/main/java",
"/Users/jvican/Code/bloop/frontend/target/scala-2.12/src_managed/main"
➜ ~ uname -a
Linux lamppc8 4.4.0-109-generic #132-Ubuntu SMP Tue Jan 9 19:52:39 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
➜ ~ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
stepping : 3
microcode : 0x1c
code navigation does not work for the file '/Users/jvican/Code/bloop/integrations/gradle-bloop/src/test/scala/bloop/integrations/gradle/ConfigGenerationSuite.scala' because the build target gradleBloop212-test is being compiled. Wait until compilation is finished and try again.
build shutdown: bloop
java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: com.sun.jna.LastErrorException: [32] Broken pipe
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at scala.meta.internal.metals.BuildServerConnection.$anonfun$shutdown$1(BuildServerConnection.scala:41)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:658)
at scala.util.Success.$anonfun$map$1(Try.scala:255)
at scala.util.Success.map(Try.scala:213)
@jvican
jvican / default.nix
Last active April 2, 2019 16:19 — forked from ottidmes/default.nix
VS Code Live Share extension
# Baseed on previous attempts of others: https://github.com/NixOS/nixpkgs/issues/41189
{ lib, vscode-utils, autoPatchelfHook, bash, file, makeWrapper, dotnet-sdk
, curl, gcc, icu, libkrb5, libsecret, libunwind, libX11, lttng-ust, openssl, utillinux, zlib
, enableDiagnosticsWorkaround ? false, gccStdenv, dos2unix
}:
with lib;
let
# https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/linux#install-prerequisites-manually
@jvican
jvican / BraveTracer.scala
Created March 28, 2019 17:04
This is a Scala wrapper around Brave tracer (Zipkin) APIs.
package bloop.tracing
import brave.{Span, Tracer}
import brave.propagation.TraceContext
import monix.eval.Task
import monix.execution.misc.NonFatal
import scala.util.Failure
import scala.util.Success
@jvican
jvican / stacktrace-metals-reconnect.log
Created March 11, 2019 20:33
Stack trace when reconnecting to build server after a dropout
Failed to connect with build server, no functionality will work.
org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: com.sun.jna.LastErrorException: [32] Broken pipe
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:72)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.request(RemoteEndpoint.java:161)
at org.eclipse.lsp4j.jsonrpc.services.EndpointProxy.invoke(EndpointProxy.java:91)
at com.sun.proxy.$Proxy8.buildShutdown(null)
at scala.meta.internal.metals.BuildServerConnection.shutdown(BuildServerConnection.scala:41)
at scala.meta.internal.metals.MetalsLanguageServer.autoConnectToBuildServer(MetalsLanguageServer.scala:988)
at scala.meta.internal.metals.MetalsLanguageServer.quickConnectToBuildServer(MetalsLanguageServer.scala:981)
at scala.meta.internal.metals.MetalsLanguageServer.executeCommand(MetalsLanguageServer.scala:871)
@jvican
jvican / bloop-config-minimal-example.json
Created August 28, 2018 11:08
These are all the mandatory fields that a Bloop project needs.
{
"version" : "1.0.0",
"project" : {
"name" : "frontend",
"directory" : "/Users/jvican/Code/bloop/frontend",
"sources" : [
"/Users/jvican/Code/bloop/frontend/src/main/scala-2.12",
"/Users/jvican/Code/bloop/frontend/src/main/scala",
"/Users/jvican/Code/bloop/frontend/src/main/java",
"/Users/jvican/Code/bloop/frontend/target/scala-2.12/src_managed/main"
@jvican
jvican / bloop-config-minimal-example.json
Created August 28, 2018 11:08
These are all the mandatory fields that a Bloop project needs.
{
"version" : "1.0.0",
"project" : {
"name" : "frontend",
"directory" : "/Users/jvican/Code/bloop/frontend",
"sources" : [
"/Users/jvican/Code/bloop/frontend/src/main/scala-2.12",
"/Users/jvican/Code/bloop/frontend/src/main/scala",
"/Users/jvican/Code/bloop/frontend/src/main/java",
"/Users/jvican/Code/bloop/frontend/target/scala-2.12/src_managed/main"
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by maven-plugin-tools 3.5 on 2018-06-16 -->
<plugin>
<name>maven-bloop</name>
<description>maven-bloop</description>
<groupId>ch.epfl.scala</groupId>
<artifactId>maven-bloop_2.12</artifactId>
<version>1.0.0-M11</version>
@jvican
jvican / integrations-bsp-intellij-bloop.md
Last active September 28, 2018 18:23
Instructions to try the BSP IntelliJ-Bloop integration out.

Installation instructions

  1. Install bloop 1.0.0-M11 by following the Bloop installation instructions. Then, make sure you start up the bloop server on the background and to generate the configuration files by running bloopInstall in your build tool.
  2. Install IntelliJ EAP 2018.2 and then enable the nigthly version of the Scala Plugin. Instructions here and picture here: intellij-eap
  3. Reboot IntelliJ. After the Scala nightly is released, open a normal project in IntelliJ and look for the IntelliJ action "Enable bsp" (usually with Ctrl-Shift-A). The search box will show the full action name: "Enable experimental bsp support". Click on it.
  4. Close the project you're in and import the project. This time, when IntelliJ shows you the available options for the import, the bsp option wi