<@U6ZRNH0TC> I’m interested seeing more about your...
# general
c
@aloof-angle-91616 I’m interested seeing more about your sbt migration wrapper.
a
so this actually works as in it works on my laptop and should work on yours, but i'm not currently using it in this codebase, and of course it's not commented
and the idea there is that you can drop it into an sbt project dir with
sbt_dist(sources=rglobs('*'))
, or something better (the point is that the sources need to cover the files you want to invalidate things)
and the idea with the task is that it publishes the sbt project to the local maven or whatever cache, and this is actually an incredibly hacky way to do it, but it was the only way i could figure out to do in a plugin as opposed to the upstream pants repo
typically you would use task products, just the jvm compile/etc code would need to be modified to know about it
and there are a million better ways to do this but essentially it publishes a snapshot and then there's a
jar_library()
elsewhere in the repo which will resolve to that (you can ensure this by giving the package name an extension)
so if i was to do this "correctly" i'm thinking (but unsure) i might want to have an sbt plugin so that pants can see the sbt projects on a more fine-grained level
the only blocker to doing this is that i literally don't know sbt and i'm very ready to learn i just haven't done it yet
c
IntelliJ injects an sbt plugin to capture the build metadata.
a
yep
so we can literally use exactly that and pants can keep track of the invalidation between sbt projects (so we can build one of them instead of all of them), or worst case we would have to modify the intellij sbt plugin a bit, but doubtful
this wouldn't be at all trivial but it would be usable internally and i've been trying to find time to do this