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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deb install - sbtopts location #3243

Closed
yurique opened this issue Jun 3, 2017 · 5 comments
Closed

deb install - sbtopts location #3243

yurique opened this issue Jun 3, 2017 · 5 comments

Comments

@yurique
Copy link
Contributor

yurique commented Jun 3, 2017

steps

  • install via deb channel (https://dl.bintray.com/sbt/debian)
  • run sbt -h
Usage:  [options]
// ...
  /etc/sbt/sbtopts   if this file exists, it is prepended to the runner args
// ...
  • edit /etc/sbt/sbtopts and add some settings
  • run sbt

problem

The parameters from the /etc/sbt/sbtopts are not applied.

expectation

The parameters from /etc/sbt/sbtopts to be applied.

notes

In the /usr/bin/sbt there's this

declare -r etc_sbt_opts_file="${sbt_home}/conf/sbtopts"

so it looks for sbtopts file in /usr/share/sbt/conf/sbtopts - putting the settings there actually works.

But when sbt package gets updated /usr/share/sbt/conf/sbtopts gets overwritten.

@yurique
Copy link
Contributor Author

yurique commented Aug 11, 2017

I'm sorry for bothering anyone seeing this again, but this one is bad. Today apt upgrade updated the sbt package without me noticing it.

I started getting java.lang.OutOfMemoryError: Metaspace when running tests - walked through a dozen of files to see where I might have broken thingst. And it turned out that the /usr/share/sbt/conf/sbtopts was silently replaced by the default one from the deb package and OutOfMemoryError was coming from the now-missing memory settings for sbt :)

@yurique
Copy link
Contributor Author

yurique commented Aug 25, 2017

It's me again, sorry. Got another update from the deb channel and it's overwritten my sbtopts again. Should I report this somewhere else?

@eed3si9n
Copy link
Member

Hi, it hasn't been a priority to look into this. I just set environment variable like SBT_OPTS.

The relevant bits are here (https://github.com/sbt/sbt-launcher-package/tree/master/src/universal/bin) if you'd like to look into fixing it, or suggest a fix.

@yurique
Copy link
Contributor Author

yurique commented Aug 25, 2017

@eed3si9n, thanks for pointing me to that location! I've created a PR to fix this issue:
sbt/sbt-launcher-package#179

it hasn't been a priority to look into this

Of course, it was a busy summer for sbt :)

@eed3si9n
Copy link
Member

Thanks again for the contribution!
Fixed in sbt/sbt-launcher-package#179

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