These are chat archives for sbt/sbt

23rd
Apr 2017
Shane Delmore
@ShaneDelmore
Apr 23 02:27
I want to publish an sbt plugin. Is there any reason to prefer bintray or sonatype?
Brian Topping
@briantopping
Apr 23 04:17
@ShaneDelmore There are costs in either path. Name mangling vs... well...
Shane Delmore
@ShaneDelmore
Apr 23 04:23
@briantopping What's with all of these real world engineering tradeoffs, I came here for easy answers :D
Brian Topping
@briantopping
Apr 23 04:24
haha! You should have started with "Dear lazyweb:...." :grin:
Shane Delmore
@ShaneDelmore
Apr 23 04:24
Still learning how to work the internet.
Brian Topping
@briantopping
Apr 23 04:30
There is no spoon...
Grzegorz Slowikowski
@gslowikowski
Apr 23 08:35
Hi. I'm calling SBT from noninteractive context. How to fail and exit immediately in case of errors during project compilation instead of entering interactive mode - "Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (here)
moglideveloper
@moglideveloper
Apr 23 18:24
Hello Everybody,

I am getting Illegal dynamic reference

while trying to access dynamic values with unmanagedSourceDirectories in Test

Please find my question here for reference
googled for dynamic tasks, but not able to find some simple explanation for sbt newbies like me
any help is much appreciated.
Thanks
moglideveloper
@moglideveloper
Apr 23 18:33

got the correct syntax from Justin on stackoverflow :-

val folderList = Seq("abc", "xyz")
unmanagedSourceDirectories in Test ++= folderList.map { src => (baseDirectory in Test).value / src }

but, i have to put some more efforts to understand what was wrong in the syntax, that i have used.
Thanks
Shane Delmore
@ShaneDelmore
Apr 23 19:47
I am trying to use an sbt-plugin I published according to the sbt-docs. Can anyone tell me what I have done wrong that this sbt-plugin is not availble using addSbtPlugin("io.sdelmore" % "imclipitly" % "0.0.1") ? https://dl.bintray.com/io-delmore/sbt-plugins/io-delmore/
Brian Topping
@briantopping
Apr 23 19:50
try with "sbt-implicitly"
Shane Delmore
@ShaneDelmore
Apr 23 19:51
But that's not what my plugin is named. I named it imclipitly purposefully to be ridiculous.
Shane Delmore
@ShaneDelmore
Apr 23 19:52
Whaa.....damned auto-incorrect!
Oh..wait, that is imclipitly, that looks right to me.
Brian Topping
@briantopping
Apr 23 19:53
or whatever it is in the URL. you could call it fubarz and it doesn't matter
it just follows the path
Shane Delmore
@ShaneDelmore
Apr 23 19:54
oh...you mean I need to add sbt- I get it. Phew, that took to embarassingly long to grok. Thanks.
Brian Topping
@briantopping
Apr 23 19:54
:)
Shane Delmore
@ShaneDelmore
Apr 23 19:55
I just mistyped here. This is what I actually have, that won't resole. addSbtPlugin("io.delmore" %% "sbt-imclipitly" % "0.0.1")
Copy and pasted for accuracy. Doesn't work with one or two % symbols.
Brian Topping
@briantopping
Apr 23 19:55
Also, do you have a repository reference?
Shane Delmore
@ShaneDelmore
Apr 23 19:55
I have never published an sbt plugin before. Some confusion there. The sbt docs say name your repository sbt-plugins, the sbt-bintray readme says name it maven.
I tried both of these if that is what you mean by a repository reference
resolvers += Resolver.jcenterRepo
resolvers += Resolver.bintrayRepo("io.sdelmore", "sbt-plugins")
Brian Topping
@briantopping
Apr 23 19:56
yes
the latter should be what you need unless you flipped some magical bit in bintard to publish to jcenter
Shane Delmore
@ShaneDelmore
Apr 23 19:57
Although other plugins, for example addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.8") don't need a separate resolver added so I would like to get mine also working without a separate resolver.
Oooh...magical bits. Exactly what I was looking for.
Brian Topping
@briantopping
Apr 23 19:57
kk
Shane Delmore
@ShaneDelmore
Apr 23 19:57
So I guess I couldn't publish my plugin to help you find hard to find enrichments due to hard to find settings. That's just perfect.
Brian Topping
@briantopping
Apr 23 19:58
ha
Shane Delmore
@ShaneDelmore
Apr 23 19:59
Although if the jcenter republishing was the problem, then it should still work with my manual adding my bintray resolver, but it does not. So something else is wrong too.
Brian Topping
@briantopping
Apr 23 20:00
i don't really use it, just providing what I know
tricks bag emptied on the table at this point...
Shane Delmore
@ShaneDelmore
Apr 23 20:04
Off to keep digging then.
Brian Topping
@briantopping
Apr 23 20:04
I guess the last trick is to dismiss every line of log output one-by-one, sometimes there's a clue there that the eager mind loses in the shuffle
Shane Delmore
@ShaneDelmore
Apr 23 20:05
I manually published last time. I just made a new release and did sbt bintrayRelease, and it crashed with no maven repo found.
I think the sbt-docs stating use sbt-plugin repo may be out of date. Or there is a missing configuration step.
Strangely difficult to find good instructions to publish compared to any other community I have tried to publish to. I would have thought the JVM publishing being so old this would be well trodden path by now.
Brian Topping
@briantopping
Apr 23 20:06
the docs have been generally improving for the better, but you are right there are often good bits in older versions of the docs. It's a bit of a chicken-egg when you are trying to learn tho
"well trodden path": SBT decided that artifact properties were the best way to support the version matrix of SDK and SBT version, but it lost maven repository support in the process, which is the well trodden standard. It has warts though, for instance Aether apparently is a real suckfest to program against. So things are what they are.
Shane Delmore
@ShaneDelmore
Apr 23 20:12
That's a reason why we are where we are, but not really a solution. What do we tell people who want to publish a utility?
I'm trying to figure it out so I can help answer questions, first I have to teach myself.
Brian Topping
@briantopping
Apr 23 20:44

I guess that's a question for others, I can't really speak to how things got here other than once I started to understand the functional nuances of the tool. the implementation started to make more sense. The 80/20 maxim definitely applies to build tools and as you must have experienced with other tools prior to SBT, it just takes a few things that are impractical or impossible to cause the whole effort to be in question.

I still learn things about SBT that I can't believe I got by for years without knowing. When I first picked up the docs, I found them rather impenetrable, but it was absolutely not because people did not do their best trying to make them great. A core understanding that I've developed with them is they make perfect sense, once I understand what I am looking at, and the irony is the docs become difficult or impossible to improve once the light bulb of understanding clicks on.

Of course this is just one perspective and weekends are kind of slow on this forum...
caoilTe O'Connor
@caoilte
Apr 23 21:34
Can anyone link to an example of an sbt plugin that cross publishes to 0.13.5 and 1.0.0-M5?
caoilTe O'Connor
@caoilte
Apr 23 22:06
@dwijnand Thanks! Just had a read through and can't find what I'm looking for. There is a lot of commenting out / uncommenting going on by @eed3si9n. Do any of those plugins have a single release process that pushes a build for 0.13 and 1.0.0 or is everything being done manually at the moment?
was hoping i could do some magic with sbt-doge
Dale Wijnand
@dwijnand
Apr 23 22:08
I don't know, but it's possible there isn't. We're ironing these details out atm.
for instance sbt-cross-building is proposed to be folded into a new sbt 0.13 release: sbt/sbt#3133
caoilTe O'Connor
@caoilte
Apr 23 22:09
aaaah! That looks like what I'm waiting for. No probs! Early days yet. :) Thanks for the awesome work.
eugene yokota
@eed3si9n
Apr 23 22:10
once it's merged to 0.13 branch, I think we should issue 0.13.16-M1 asap
then I can truely cross publish plugins
(i somehow thought it's been approved, but I guess it's not yet)
caoilTe O'Connor
@caoilte
Apr 23 22:15
@eed3si9n i wish your sbt-doge plugin could be merged as well and the whole cross releasing of multi module builds made straight forward.
Dale Wijnand
@dwijnand
Apr 23 22:21
@eed3si9n It's on my list for tomorrow. Hopefully I can PR sbt/sbt#3091 and sbt/sbt#3097 in time for 0.13.16-M1
@caoilte sbt-doge is merged into 1.0. I think we can't merge it into 0.13 for semantic reasons.
caoilTe O'Connor
@caoilte
Apr 23 22:22
@dwijnand ooh. I didn't realise. That's nice.
Shane Delmore
@ShaneDelmore
Apr 23 23:27
What are the terms used to replace such and very with the sbt-doge merged into 1.0?
eugene yokota
@eed3si9n
Apr 23 23:28
probably back to +
Shane Delmore
@ShaneDelmore
Apr 23 23:28
Any aliases? Perhaps cross?
How do I cross publish? Sbt cross publish.
eugene yokota
@eed3si9n
Apr 23 23:29
sure
that sounds like a good idea
it's already called cross internally in the code
Shane Delmore
@ShaneDelmore
Apr 23 23:30
Glad to hear it's getting integrated :thumbsup:
Excellent.
eugene yokota
@eed3si9n
Apr 23 23:30
do you mind opening GitHub issue for it?
Shane Delmore
@ShaneDelmore
Apr 23 23:30
Not at all. Will do it now.