Can you set the priority of your compiler plugin? ...
# compiler
c
Can you set the priority of your compiler plugin? I want to make sure my plugin is run last so I don't conflict with others treading the same ground.
j
You can specify relative ordering, but that requires knowledge of the other plugin IDs that need to come before you.
c
So there's no way to specify "I always want to run after everything else"? Also, what are the semantics of multiple assignment-alterer extensions running? Does one giving an output stop the others from receiving the assignment?
z
And it’s only going to be possible in 2.3.0-Beta03/RC1
j
What would you do if two plugins wanted to run after everything else?
➕ 3
b
I remove the other
😅 2
e
Fight to the death, Plugin vs Plugin. Monday Night Rumble. Winner takes all.
c
> What would you do if two plugins wanted to run after everything else? That's an issue with any priority system, and in most systems it comes down to some kind of latent ordering, such as alphabetical. Regardless, having that one edge case where it might be a crapshoot is better than it always being a crapshoot.
y
Multiple assignment alterers that try to transform the same assignment result in a diagnostic error, apparently
c
result in a diagnostic error
God, what a plugin system
I know JetBrains doesn't consider it important, but I wish they'd hire someone to make a proper plugin system. I'd be down to do the job; it's genuinely important to be able to prove the language will be improved by a feature. Or I guess I could just break out the ASM, but Kotlin code is awful to interface with on that front
❓ 1
y
I believe they intend to iron out the issues with it eventually. Tbh, it's better to have it like this than to not have it at all 🤷🏼 . I see why that choice in particular was made, though. Plugin ordering wasn't really a thing, yet. Just taking the first plugin who'd transform this thus wouldn't make much sense. In fact, it encourages you to have some annotation or something that tells you that your plugin should handle this declaration
j
They have plenty of people building a plugin system already. It's pretty rude to trivialize such an effort.
☝🏾 1
➕ 2
☝️ 3
c
If there are, then you're right, I'm sorry. I'm just annoyed because I keep seeing things that get in the way. But if there are things going on behind the scenes, then I'll hold my tongue
j
I think the problem is that they're actually giving it a lot of thought!
💯 1
A bad plugin API could inhibit their future abilities