sbt-1.1.1 sbtVersion showing 1.1.0 - sbt

I invoke:
brew install sbt
I get:
/usr/local/Cellar/sbt/1.1.1: 491 files, 48.3MB, built in 7 seconds
I invoke:
sbt sbtVersion
I get:
[info] Loading project definition from /Users/name/project
[info] Set current project to name (in build file:/Users/name/)
[info] 1.1.0
I'm expecting to see
[info] 1.1.1
Why don't the version values match?
Thank you.

Most likely, because you have a file project/build.properties with line
sbt.version=1.1.0
So one thing is the version of the launcher that you installed with Homebrew and another is the version of the sbt you launch in particular project. If you don't set it explicitly in project/build.properties, sbt will try to run its own version (launcher's, i.e. 1.1.1 in your case).
Another possible reason is that Homebrew could install the formula, but not link the binaries (assuming you upgraded from sbt 1.1.0). You can run several commands to verify which versions you have
$ brew info sbt
...
$ brew list --versions sbt
sbt 0.13.16 0.13.11 1.0.0 1.0.1 1.1.0 0.13.12 0.13.15 1.1.1 0.13.13 1.0.4 1.0.3 1.0.2
$ brew list sbt
/usr/local/Cellar/sbt/1.1.1/bin/sbt
/usr/local/Cellar/sbt/1.1.1/libexec/bin/ (5 files)
/usr/local/Cellar/sbt/1.1.1/libexec/lib/ (483 files)
You can see here that I have many old versions installed, but the one linked is 1.1.1. In case I need to switch to an older launcher, I can run brew switch sbt 1.0.4, for example.

Related

Why does cirlceCI does not build successfully when renv is part of a R package?

Im trying to set up a CI for a R package. In that regard I`m considering circleCI, which has worked out with previous R projects. However this time, I get the following error:
Downloading renv 0.14.0 ... OK (downloaded source)
Installing renv 0.14.0 ... Done!
Successfully installed and loaded renv 0.14.0.
Project '~/main' loaded. [renv 0.14.0]
devtools::install_deps(dependencies = TRUE)
Error in loadNamespace(x) : there is no package called ‘devtools’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
My .circleci/config.yml looks similar to that one
version: 2
jobs:
build:
docker:
- image: my_random_image
steps:
- checkout
- run:
name: Install package dependencies
command: R -e "devtools::install_deps(dep = TRUE)"
- run:
name: Build package
command: R CMD build .
- run:
name: Check package
command: R CMD check *tar.gz
and my_random_image looks as follows:
FROM r-base:4.1.2
RUN apt-get update \
&& apt-get install git libssl-dev ssh texlive-latex-base texlive-fonts-recommended
libcurl4-openssl-dev libxml2-dev -y \
&& rm -rf /var/lib/apt/lists/*
RUN R -e "install.packages(c('devtools', 'roxygen2'), repos='http://cran.us.r- project.org')"
So its pretty standard stuff, as far as I can see. The error only occurs if renv is part if my R package. Otherwise circleCI does not complain and runs as expected without any errors.
I would like to keep renv in my R project and therefore struggle to understand the issue and the solution to that.
appreciate any help!!
The issue here is most likely that your run stage, here:
- run:
name: Install package dependencies
command: R -e "devtools::install_deps(dep = TRUE)"
installs packages into the default user / site libraries, but when R is launched in your project's working directory:
Downloading renv 0.14.0 ... OK (downloaded source)
Installing renv 0.14.0 ... Done!
Successfully installed and loaded renv 0.14.0.
Project '~/main' loaded. [renv 0.14.0]
the renv autoloader is automatically downloading renv, and activating the renv project library.
By default, renv isolates projects from the user / site library, so the packages installed in your earlier steps are not visible within the project. This behavior is intentional, and ensures that different project libraries are isolated both from changes in the user / site libraries, as well as in other project libraries.
One of the following should help:
If your renv.lock is up to date, call renv::restore() before trying to use devtools or other packages;
Allow renv to see the user library, with e.g. the environment variable RENV_CONFIG_USER_LIBRARY = TRUE.
I'd recommend reading https://rstudio.github.io/renv/articles/renv.html and https://rstudio.github.io/renv/articles/ci.html if you haven't already.

SBT fails to launch on ARM64 Apple silicon with error Could not find required component 'xsbti'

When I launch SBT 1.5 using the command which in turn launches version 0.13 for the project
❯ sbt -v
[sbt_options] declare -a sbt_options='()'
[process_args] java_version = '8'
# Executing command line:
java
-Dfile.encoding=UTF-8
-Xms1024m
-Xmx1024m
-Xss4M
-XX:ReservedCodeCacheSize=128m
-jar
/opt/homebrew/Cellar/sbt/1.5.0/libexec/bin/sbt-launch.jar
[info] Loading global plugins from /Users/viswanath/.sbt/0.13/plugins
[info] Updating {file:/Users/viswanath/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
I get the following error
[error] (compile:compileIncremental) sbt.InvalidComponent: Could not find required component 'xsbti'
on my MacBookPro with M1 processor (a.k.a Apple silicon) on ARM64 architecture. Any clue on how to fix this problem?
Note: Bundled SBT runs fine on IntelliJ
Try installing with SDKMAN
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java
sdk install sbt
sbt compile
Bumped up the project's SBT version to 1.5.0 and the problem disappeared. See this githib issue for more information.
Alternatively, check this workaround on SBT 1.5.0 for launching SBT in interactive mode.
sbt -Dsbt.boot.directory=/tmp/boot1 -Dsbt.launcher.coursier=false

Cannot install or uninstall SBT

Using Windows 10. Trying to install SBT 1.2.1 but cannot because SBT already installed. Trying to uninstall SBT 1.0.2 but it fails.
How do I uninstall SBT 1.0.2 on Windows 10?
I am pretty sure it's going to be there in the control panel under Add/remove programs . If you can't find it with the name SBT it's probably going to be under Simple Build Tool .

Unable to install sbt 0.13.16 using SDK Manager

I'm trying to install sbt 0.13.16 using SDK Manager.
$ sdk install sbt 0.13.16
Stop! sbt 0.13.16 is not available. Possible causes:
* 0.13.16 is an invalid version
* sbt binaries are incompatible with Darwin
Below is the SDK details -
$ sdk version
SDKMAN 5.5.13+272
Any reason, why I'm not able to install sbt 0.13.16 using sdk manager.
You are not able to install this version because it is not available.
To find out all the SBT candidate versions available for installation run the command:
sdk list sbt

(Linux dotnet)output “Segmentation fault” when run "dotnet restore"

I installed dotnet-sdk in Deepin(base Debian),but when I run "dotnet restore" that output "Segmentation fault".
Install .NET Core SDK document (https://www.microsoft.com/net/core#linuxdebian)
Command Line:
root#ylooq:~/soft$ cd ../
root#ylooq:~$ mkdir hello
root#ylooq:~$ cd hello/
root#ylooq:~/hello$ ls
root#ylooq:~/hello$ dotnet new
Created new C# project in /home/ylooq/hello.
root#ylooq:~/hello$ dotnet restore
log : Restoring packages for /home/ylooq/hello/project.json...
Segmentation fault
root#ylooq:~/hello$ ls
Program.cs project.json
I assume that you are using deepin 15 which is based on Debian Unstable branch.
Dotnet core depends on old versions of libcurl3 and the issue causes libssl1.0.0 library, which comes with libcurl3.
This is a list of packages that dotnet-sdk-2.0.0-preview2(for Debian) depends on:
libc6 (>= 2.14), libcurl3 (>= 7.16.2), libgcc1 (>= 1:4.1.1),
libgssapi-krb5-2 (>= 1.10+dfsg~), liblttng-ust0, libstdc++6 (>= 4.8),
libunwind8, libuuid1 (>= 2.16), zlib1g (>= 1:1.1.4), libssl1.0.0
In Debian 8(jessie) you can find these packages. Please try adding debian jessie repo to sources.list:
deb http://ftp.debian.org/debian/ jessie main non-free contrib
deb-src http://ftp.debian.org/debian/ jessie main non-free contrib
These links might be helpful to you since you might have to use apt-pinning :) in order to download older versions of packages:
Apt pinning
Issue of libcurl3

Resources