Ahmed Mourad
05/03/2020, 8:32 PMFoso
05/03/2020, 8:39 PMAhmed Mourad
05/03/2020, 8:50 PMdmitriy.novozhilov
05/03/2020, 9:10 PMIrGenerationExtension
for backend IR. You can also change signature of function, but if you do then you need also change all call sites
Can you share usecase when it's needed to remove some user defined function?Ahmed Mourad
05/03/2020, 9:34 PMgenerateSyntheticMethods
so the user can't reference it and so it gets removed in the optimization stage.
However it's not optimal and does have its corner cases so I want to remove it entirely in favor of a more robust implementation.
The second use case is I want to modify the visibility of some methods generated by Google's safe-args plugin, while also adding other methods but that's way off-topic i guess.dmitriy.novozhilov
05/03/2020, 9:41 PMcopy
and componentN
in data classes is a known language design problem, but we haven't any solution for it yet (it's not obvious how user should tell compiler if he wants those methods or not and also there is a compatibility problem)
2. I suppose for this case your method with SyntheticResolveExtension
should also work. Am I right?dmitriy.novozhilov
05/03/2020, 9:43 PMAhmed Mourad
05/03/2020, 10:11 PM@NoCopy
but if the problem is to be solved at a language level, I suppose you need a more elegant solution than method-specific annotations.
I was also looking at the componentN
problem ever since Jake Wharton brought it up in his talk but so far all solutions I found are complicated to implement and would break existing code.
Regarding the copy
method, is it possible to remove it with a compiler plugin? or do i have to stick with my implementation?
2- It works for changing visibility to anything but internal
, changing to internal
causes problems due to missing synthetic
methods.Ahmed Mourad
05/03/2020, 10:12 PMDrew Hamilton
05/04/2020, 6:11 AMdmitriy.novozhilov
05/04/2020, 9:03 AMwe're also supposed to get official docs for compiler plugins at some point in 1.4, right?Unfortunately no, current compiler API remains unstable and undocumented. We are focused on developing new consistent API for plugins that will be implemented in new compiler frontend, but it's unknown when it will be released (we hope that there will be some beta in next spring, but there are no guaranties)
Ahmed Mourad
05/04/2020, 2:23 PMAhmed Mourad
05/04/2020, 2:26 PM