Comments (11)
btw, version parser has been updated (you can use homebrew version): #68
from bazel-bsp.
temporary workaround would be changing to version without
homebrew
suffix (4.*.*
preferable)second option is to update a source code locally - change
SEMANTIC_VERSION_REGEX
value into^([0-9]+)\\.([0-9]+)\\.([0-9]+)-homebrew
👍🏼 bingo that did it. I uninstalled with Brew and just did a manual install, and we are back in business. Thanks for helping me track that down! Looking forward to digging more into this.
from bazel-bsp.
Hi, thanks a lot for such detailed explanation!
Lots of things have changed, but we forgot to update readme (fixed yesterday).
Initialization is quite tricky -- we'll try to simplify it somehow. Also, currently it's still 0.1.0
, but as far as I know we'll try to introduce next verstion soon. Nevertheless, this should help you:
In bazel-bsp
project reposiotry:
./buildAndRunLocally.sh
And then in the target repository:
coursier launch -r sonatype:snapshots -r central -r file:///~/.m2/repository org.jetbrains.bsp:bazel-bsp:0.1.0 -M org.jetbrains.bsp.bazel.install.Install
(all files, incuding ./bsp/.bazelbsp
should be created)
from bazel-bsp.
And then in the target repository:
So something seems to not be fully publishing correctly since if I do those exact steps in my target repo or even on a fresh clone of this repository I end up with:
~/Documents/java-workspace/bazel-bsp dev
❯ ./buildAndRunLocally.sh
Building server...
============================
INFO: Analyzed target //src/main/java/org/jetbrains/bsp/bazel:bsp-install (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //src/main/java/org/jetbrains/bsp/bazel:bsp-install up-to-date:
bazel-bin/src/main/java/org/jetbrains/bsp/bazel/bsp-install.jar
bazel-bin/src/main/java/org/jetbrains/bsp/bazel/bsp-install
INFO: Elapsed time: 0,130s, Critical Path: 0,00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
Running server at /Users/ckipp/Documents/java-workspace/bazel-bsp
============================
Bazel BSP server installed in
Done!
~/Documents/java-workspace/bazel-bsp dev
❯ coursier launch -r sonatype:snapshots -r central -r file:///~/.m2/repository org.jetbrains.bsp:bazel-bsp:0.1.0 -M org.jetbrains.bsp.bazel.install.Install
Error: Could not find or load main class org.jetbrains.bsp.bazel.install.Install
Caused by: java.lang.ClassNotFoundException: org.jetbrains.bsp.bazel.install.Install
Note that using the script and passing in the dir for the target or just letting it run in the current dir does create the .bsp/bazelbsp.json
file, but then I still on it never responding to the initialization request.
from bazel-bsp.
Sorry for this misunderstanding. Obviously I messed up -- this should help you:
in bsp-bazel repo:
bazel build //src/main/java/org/jetbrains/bsp/bazel:bsp-install
export bsp_path="$(bazel info bazel-bin)/src/main/java/org/jetbrains/bsp/bazel/bsp-install"
and then in your repo:
$bsp_path
(it worked for me)
Like I said - it's a bit tricky, tricky enough to trick me.
Sorry for this
from bazel-bsp.
No worries at all, thanks for the explanation. If I'm not mistaken that should be the same as just doing ./buildAndRunLocally.sh <path to repo>
. However your instructions correctly create the bsp dirs, but unfortunately I still have the initial issue of it not being able to connect.
2021.06.19 09:11:24 ERROR Timeout waiting for 'build/initialize' response
2021.06.19 09:11:24 ERROR Failed to connect with build server, no functionality will work.
Any tips on debugging what my be happening on the bazel-bsp side? If not I'll just start doing a deep dive into trying to figure out what's happening.
from bazel-bsp.
If I'm not mistaken that should be the same as just doing ./buildAndRunLocally.sh
yep
I tested it on my own with intellij client and everything succeed.
What version of bazel are you using? bazel version
Maybe your client doesnt create conection correctly or something? does it happen only with bazel-bsp, or maybe other bsp implementations have similiar problems?
from bazel-bsp.
What version of bazel are you using?
bazel version
❯ bazel version
Build label: 4.1.0-homebrew
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jan 1 00:00:00 1980 (315532800)
Build timestamp: 315532800
Build timestamp as int: 315532800
Maybe your client doesnt create conection correctly or something? does it happen only with bazel-bsp, or maybe other bsp implementations have similiar problems?
So by default Metals uses Bloop, but we've also tested with sbt as a BSP server and also Mill. All of them initialize correctly with Metals. There is a much better chance of me just totally missing something then our BSP discovery and initialization process not working right. It should be pretty battle tested since we fully rely on it working.
I just actually tested with IntelliJ as well, and I actually got a bit more info. When I do try to load the BSP project (this repo) via intelliJ it fails with:
java.lang.IllegalArgumentException: Invalid version format
at org.jetbrains.bsp.bazel.server.bazel.data.SemanticVersion.<init>(SemanticVersion.java:27)
at org.jetbrains.bsp.bazel.server.bazel.data.SemanticVersion.fromReleaseData(SemanticVersion.java:51)
at org.jetbrains.bsp.bazel.server.bazel.data.BazelData.<init>(BazelData.java:21)
at org.jetbrains.bsp.bazel.server.bazel.BazelDataResolver.resolveBazelData(BazelDataResolver.java:30)
at org.jetbrains.bsp.bazel.server.BazelBspServer.<init>(BazelBspServer.java:48)
at org.jetbrains.bsp.bazel.server.ServerInitializer.main(ServerInitializer.java:49)
Which does give me some places to dig into.
from bazel-bsp.
okey, I believe that our parser is not prepared for the *-homebrew
version, I'll try to address this issue
from bazel-bsp.
temporary workaround would be changing to version without homebrew
suffix (4.*.*
preferable)
second option is to update a source code locally - change SEMANTIC_VERSION_REGEX
value into ^([0-9]+)\\.([0-9]+)\\.([0-9]+)-homebrew
from bazel-bsp.
Great! Hopefully everything'll be fine now.
If you have any further questions / problems dont hesitate to contact us
from bazel-bsp.
Related Issues (20)
- If `bazel info exec_root` fails contents of stderr should be printed HOT 1
- project is built around a fork of `rules_kotlin` HOT 3
- java 17 HOT 5
- e2e tests for project view files HOT 1
- [project view] support for `build_flags`
- new contribution guide
- new installer HOT 1
- vavr for the win
- cpp plugin implementation HOT 2
- support for excluded targets
- can we get rid of `SemanticVersion`?
- Generate project view based on args to installer HOT 7
- codebase cleanup after new sync mechanism HOT 1
- Handle resolution failure in BazelPathsResolver HOT 2
- bazel creates symlinks that IntelliJ is indexing HOT 4
- Server state is not maintained between bazel-bsp runs
- HAVE YOU FOUND A BUG? DO YOU WANT TO ASK FOR A NEW FEATURE? PLEASE USE YOUTRACK
- Version 2.0.0 is not on maven? HOT 2
- aspects.bzl attempts to access non-existent struct field HOT 3
- could we make a new release? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazel-bsp.