Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to turn off default JVM warning #369

Open
KristianAN opened this issue Nov 14, 2023 · 2 comments
Open

Option to turn off default JVM warning #369

KristianAN opened this issue Nov 14, 2023 · 2 comments

Comments

@KristianAN
Copy link

When running a bleep build without specifying a JVM we get the warning "馃摍 Your build uses the default system JVM, which can change outside the build. For stable builds over time, let bleep manage your chosen JVM by adding it to bleep.yaml".

I manage my build dependencies with Nix flakes so this is really a non issue for me, as such I want to turn this warning off.

I can try making a PR for this myself, I just need to figure out how to build bleep with nix :D Right now I can't because the bleep build requires using the JVM defined in the bleep.yml, which just does not work on Nix (can only use JVMs fetched from nixpkgs.

On a less related note. I also have not got the sbt import to work in Nix, I tried adding an option to supply my own sbt, but I have not gotten it working yet: master...KristianAN:bleep:master. Iterating takes a while because I am building/packaging it in GH and patching it with nix. I am guessing I can just package it as a Jar? when I figure out local builds that would make it easy for me to test it.

@oyvindberg
Copy link
Owner

oyvindberg commented Nov 16, 2023

Hey there

It's somewhat unfortunate that I don't know the first thing about nix. I guess it comes across as having a tiny bit of overlapping functionality, given that bleep manages bleep itself, JVMs, node, sbt, scalafmt and whatever else it needs. I think I would need an explanation of how you work within this regime before we even start to talk about bleep :)

let's say scalafmt. it has a .scalafmt.conf file with a version. the wrapper script downloads the version and runs it. exactly the same with sbt actually. how does that work in a nix world?

@KristianAN
Copy link
Author

Nix is a lot of things I guess, NixOs/Nixpks/Nix flakes. In essence it's a way to manage packages. A common usage pattern is to use nix flakes to manage development environments on a per project basis. Flakes consist of a flake.nix file that list build dependencies. Here is an example flake.nix file from Tyrian. Here you can see that it specifies sbt, coursier, mill and openjdk as dependencies. So if I want to work on that project I just need to clone it, cd into it, run nix develop and my env will be set up with everything I need.

Everything is very neat in this nix world, because every package is built with all it's dependencies bundled, much like snapcraft and flatpak also does. This also means that a NixOs system has no globally available glibc and similar that applications can use. So when bleep tries to download anything that isn't a jar and run it, it simply will not work, unless it's an actual stand-alone binary.

In any case this isn't anything that is an issue from Bleep's standpoint. This is something that will be an issue on a nix system with any tool that tries to fetch and use binaries from sources that aren't nixpkgs.

I am no Nix expert, but I hope this clarified it some.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants