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

SBT plugins fail when SBT directories are relocated to a relative path #3729

Open
alanbur opened this issue Nov 10, 2017 · 3 comments
Open
Labels
uncategorized Used for Waffle integration

Comments

@alanbur
Copy link

alanbur commented Nov 10, 2017

SBT version 1.0.2

I have a .sbtopts in my project directory to relocate the .sbt and .ivy2 directories:

-ivy ../sbt_cache
-sbt-boot ../sbt_cache
-sbt-dir ../sbt_cache

And in ../sbt_cache I have a plugins directory. When I run sbt it throws the following exception and fails:


java.lang.AssertionError: assertion failed: Not absolute: ../sbt_cache/plugins
	at scala.Predef$.assert(Predef.scala:179)
	at sbt.IO$.assertAbsolute(IO.scala:922)
	at sbt.IO$.directoryURI(IO.scala:889)
	at sbt.Load$.load(Load.scala:316)
	at sbt.Load$.load(Load.scala:305)
	at sbt.Load$$anonfun$4.apply(Load.scala:146)
	at sbt.Load$$anonfun$4.apply(Load.scala:146)
	at sbt.Load$.timed(Load.scala:1025)
	at sbt.Load$.apply(Load.scala:146)
	at sbt.GlobalPlugin$.build(GlobalPlugin.scala:36)
	at sbt.GlobalPlugin$.load(GlobalPlugin.scala:42)
	at sbt.Load$.loadGlobal(Load.scala:102)
	at sbt.Load$.defaultWithGlobal(Load.scala:67)
	at sbt.Load$$anonfun$1.apply(Load.scala:35)
	at sbt.Load$$anonfun$1.apply(Load.scala:30)
	at sbt.Load$.timed(Load.scala:1025)
	at sbt.Load$.defaultLoad(Load.scala:30)
	at sbt.BuiltinCommands$.liftedTree1$1(Main.scala:503)
	at sbt.BuiltinCommands$.doLoadProject(Main.scala:503)
	at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:495)
	at sbt.BuiltinCommands$$anonfun$loadProjectImpl$2.apply(Main.scala:495)
	at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:59)
	at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:59)
	at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:61)
	at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:61)
	at sbt.Command$.process(Command.scala:93)
	at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:96)
	at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:96)
	at sbt.State$$anon$1.runCmd$1(State.scala:183)
	at sbt.State$$anon$1.process(State.scala:187)
	at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:96)
	at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:96)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.MainLoop$.next(MainLoop.scala:96)
	at sbt.MainLoop$.run(MainLoop.scala:89)
	at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:68)
	at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:63)
	at sbt.Using.apply(Using.scala:24)
	at sbt.MainLoop$.runWithNewLog(MainLoop.scala:63)
	at sbt.MainLoop$.runAndClearLast(MainLoop.scala:46)
	at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:30)
	at sbt.MainLoop$.runLogged(MainLoop.scala:22)
	at sbt.StandardMain$.runManaged(Main.scala:61)
	at sbt.xMain.run(Main.scala:35)
	at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
	at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
	at xsbt.boot.Launch$.run(Launch.scala:109)
	at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
	at xsbt.boot.Launch$.launch(Launch.scala:117)
	at xsbt.boot.Launch$.apply(Launch.scala:18)
	at xsbt.boot.Boot$.runImpl(Boot.scala:41)
	at xsbt.boot.Boot$.main(Boot.scala:17)
	at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.AssertionError: assertion failed: Not absolute: ../sbt_cache/plugins
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

It's unclear why the plugins directory would have to be absolute in the first place.

@dwijnand dwijnand self-assigned this Jan 16, 2018
@jonas-db
Copy link

Same problem, is there a work-around???

@dwijnand dwijnand removed their assignment Jul 2, 2018
@eed3si9n eed3si9n added the uncategorized Used for Waffle integration label Sep 18, 2018
@SethTisue
Copy link
Member

is there a work-around???

use absolute paths?

@alanbur
Copy link
Author

alanbur commented Feb 16, 2023

It's not really a workaround when when working across multiple users and/or machines...

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

No branches or pull requests

5 participants