These are chat archives for sbt/sbt

15th
Mar 2016
Tin Pavlinic
@triggerNZ
Mar 15 2016 05:09
is it possible to addSbtPlugin from another plugin? i.e. enable another plugin if mine is enabled?
nafg
@nafg
Mar 15 2016 05:10
@triggerNZ AutoPlugins allows for such things
Tin Pavlinic
@triggerNZ
Mar 15 2016 05:10
okay, i will check it out
@nafg thanks for your help, on both channels :)
Anthony Holland
@aholland
Mar 15 2016 11:22
Is there a way to get a log of where sbt gets each library, or would get it if it weren't already locally available in the ivy cache? And of which resolver was used in doing so? This is the same question as yesterday but hopefully more clear and succinct!
nafg
@nafg
Mar 15 2016 12:54
Try show update
Shane Delmore
@ShaneDelmore
Mar 15 2016 17:31
show update is super useful. Thank you.
Simon Hafner
@reactormonk
Mar 15 2016 17:57
For generated scala code, the code generates errors located in the initial file for the code generation - is it possible to get the errors in the generated scala file instead?
Perry
@pfn
Mar 15 2016 18:12
huh
Simon Hafner
@reactormonk
Mar 15 2016 18:22
I'm getting errors like /tmp/activator-1.3.7-minimal/playground/target/scala-2.11/cache/root/compile/apij/api.apij:0: Invalid literal number
Perry
@pfn
Mar 15 2016 18:31
still huh
Simon Hafner
@reactormonk
Mar 15 2016 18:35
I've got code that generates scala from that api.apij file, but the scala compiler errors show up as above. Any way to get the compiler errors show up in the generated scala file instead.
Perry
@pfn
Mar 15 2016 18:42
errors are usually never in the template
something else is going on here
Simon Hafner
@reactormonk
Mar 15 2016 18:43
Yeah. I'm trying to figure out what.
Pretty sure the generated code is somehow invalid. But I have no clue where said code is.
So I want sbt to give me a better error message.
Actually, I do via show compile:sources - but that doesn't let me run the compiler with the env on these files.
Perry
@pfn
Mar 15 2016 18:48
sbt is showing you what it thinks the problem is, has nothing to do with generated sources
Simon Hafner
@reactormonk
Mar 15 2016 18:50
/tmp/activator-1.3.7-minimal/playground/target/scala-2.11/cache/root/compile/apij/api.apij:0: value get is not a member of api.Selection - can I ask it where exactly the Scala file is where that error occurred? sbt assumes that plugins are always right, which they aren't in this case.
andy scott
@andyscott
Mar 15 2016 20:21
Does SBT provide any facilities for caching files globally? I’m working on a plugin and I’d like to cache a file per maven repo. It’d be ideal to cache this across all SBT projects instead of on a per project basis.
Perry
@pfn
Mar 15 2016 20:30
cache what? ivy is a global cache
andy scott
@andyscott
Mar 15 2016 20:33
Pretend I didn’t mention ivy— is there anything already in SBT that helps with caching files? Or anything in SBT that helps with creating resources in the ~/.sbt/x.yy/ directores?
hey sbt! do you have a nice screenshot or graph that would look nice on http://i.imgur.com/aqzudXi.png
andy scott
@andyscott
Mar 15 2016 20:34
But since you ask, in this case it’s an XML resource file.
it looks kind of dull currently.
Eric K Richardson
@ekrich
Mar 15 2016 20:34
In sbt, if you declare dependencies then they are resolved and then cached in a per user .ivy directory.
eugene yokota
@eed3si9n
Mar 15 2016 20:37
maybe a screengrab from sbt-meow
Eric K Richardson
@ekrich
Mar 15 2016 20:37
Not sure what you are trying to do but typically in the standard sbt layout resources go in src/main/resources
Then the resource will end up on the classpath.
pfn @pfn caches stuff manually and by timestamp
eugene yokota
@eed3si9n
Mar 15 2016 20:40
@soc I can't think of a good picture off the top of my head. is this something someone can send a pull request to?
andy scott
@andyscott
Mar 15 2016 20:40
Right— maybe resources was a bad word to use. I have some new commands introduced by a plugin and I need to cache some data, somewhere, across multiple runs of the command. But the data isn’t specific to the project that the command was run in, so I could cache this data globally for all projects where this plugin is being used.
nafg
@nafg
Mar 15 2016 20:41
@soc take a screenshot doing ~testQuick in some project
showing lots of nice green test output, and the "waiting for changes" message at the bottom
ideas, criticism appreciated!
@nafg that sounds like a great idea!
nafg
@nafg
Mar 15 2016 20:42
Just make the font size big first
the current context is just a placeholder
it's stolen from the SBT website
I intend to replace that soon anyway
nafg
@nafg
Mar 15 2016 20:42
context?
sorry
content
the text in sbt
still not sure whether I should keep the linter/stylechecker tab
does anyone have a better idea?
it feels like there is no "complete" tool that covers what people actually want
just many tools which do some parts
nafg
@nafg
Mar 15 2016 20:44
@soc the sublime screenshot is a bit fuzzy
maybe I could extend it to stuff like coverage ...
eugene yokota
@eed3si9n
Mar 15 2016 20:45
I would suggest sbt and some IDE gets incorporated into a Getting Started guide
yes, didn't make a new one. the existing one is stolen from the ensime site and has low resolution
@eed3si9n that's my plan :)
nafg
@nafg
Mar 15 2016 20:45
no big deal
eugene yokota
@eed3si9n
Mar 15 2016 20:45
instead of the big green Download link
+1
yes, I really want to fix that. I just haven't found a nice design yet.
all, please feel free to create issues to remind me of stuff you'd like
eugene yokota
@eed3si9n
Mar 15 2016 20:47
if there's a Github issue for making a 30 sec gif screencast of compiling and ~testQuick or something, I can tweet that out to find a volunteer person to do it
nafg
@nafg
Mar 15 2016 20:59
@eed3si9n not sure if a screencast makes sense in this context
it's not so focused
I think he just wants a screenshot
Perry
@pfn
Mar 15 2016 21:08
@andyscott, just choose a folder of your own making and handle
@andyscott, there's nothing in sbt proper to handle it, not that I know of at least
stuff that goes in ~/.sbt is handled by launcher, I think
andy scott
@andyscott
Mar 15 2016 21:11
Sounds good. Is there anything wrong with using my own subdir of ~/.sbt/?
Or more specifically my own subdir of BuildPaths.getGlobalBase(state)
pfn @pfn shrugs
andyscott @andyscott shrugs back
andy scott
@andyscott
Mar 15 2016 21:15
I can make it work either way. Thanks!
pfn @pfn throws his stuff into ~/.android/sbt/...