Oh, yes, and I've tried the alternative apporach (...
# general
s
Oh, yes, and I've tried the alternative apporach (from the doc) by adding have a differently named jar_library target and adding a
scalac_plugins
in the
[compile.zinc]
section in the
pants.ini
file, but that approach complains that there's no such option. EDIT: Any help debugging this (e.g. flags I can use to show the compiler options actually being used, etc.) would be greatly appreciated.
a
hey, sorry you didn't get a response. the way i usually do this is by running e.g.
./pants options | grep -i --color scalac_plugin
. in this case, i think the option moved from
[compile.zinc]
to
[scala]
(which you should be able to verify by running that command).
it looks like the docs really need to be updated now
i'm sorry for the confusion
the options passed to the compiler are now determined by something called
compiler_option_sets
which can be specified per-target, which key into fields of the dicts in
compiler_option_sets_enabled_args
and
compiler_option_sets_disabled_args
. these options are available in multiple scopes (javac, zinc compile, etc)
please let me know if we can help you get moving further -- today was scale by the bay so a lot of us were distracted
s
Ah, nice, thanks for the pointers so far! It'll probably take a few days before I get to experimenting again, but hopefully I'll be able to get things up and running (and might contribute back some doc updates + examples if I can figure it out)
a
sorry for the trouble! i understand most people can't experiment all the time -- thanks for volunteering the contribution! i will try to make sure to be available on slack over the weekends more often too (i haven't been at all)
s
Ok, I've figured out what was wrong. As you mentioned the scalac_plugins option was moved to
[scala]
. I've submitted a PR fixing that: https://github.com/pantsbuild/pants/pull/6807 The other issue is that I misunderstood the documentation about adding 'scalac-plugin-deps'. For some reason it didn't click that the plugin name one is supposed to use in the scalac_plugins list has nothing to do with the name of the 'target' name which points to the external jar.
I've got it working now, btw! Thank you for the help, @aloof-angle-91616 🙂 Now I just need to see if I can revive the "twirl" source code gen that someone posted a prototype(?) of 3 years ago 🙂.
a
the issue with scalac plugin deps is one i have actually raised and didn't spend the time to actually fix, docs-wise, because multiple people have lost time trying to understand the current text (i might have a branch that tries to fix that locally -- would need to check)
i'm really glad you've got it working
"twirl" referring to what?
maybe the
scalac_plugins
code makes sense to someone who has written scalac plugins before but there could be another sentence about what those args actually correspond to
not sure of the right approach there
s
oh, "twirl" is the Play templating engine (which is available as a standalone thing).