I am in the process of refactoring lots of code and found a few tiny enhancements that would make me more productive with (presumably) little effort:
Tom
I agree -there's other low-hanging fruit, but we don't seem to be making enough noise about it.
Tom
Coming back to this, because Pharo people also don't like the fact that RB reformats code, or at least does so in a different way than the platform's formatters do (in our case QA Code formatter, for example).So I guess it would be great if there was some kind of plugin mechanism in RB that invokes some "native" code formatter instead of introducing its own strange one...
Richard,this is interesting. Stef also mentioned this on the pharo mailing list, I wasn't aware of this.
Do you happen to know where to llok for this hook? I'd love to experiment with uing the QA Code Formatter as the default formatter for RB...
--On Fri, May 22, 2020 at 5:09 AM Joachim Tuchel <jtu...@objektfabrik.de> wrote:Richard,this is interesting. Stef also mentioned this on the pharo mailing list, I wasn't aware of this.
Do you happen to know where to llok for this hook? I'd love to experiment with uing the QA Code Formatter as the default formatter for RB...+ That would be good. At least as an option.
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
Email: mpeck@instantiations.com
Richard,this is interesting. Stef also mentioned this on the pharo mailing list, I wasn't aware of this.
Do you happen to know where to llok for this hook? I'd love to experiment with uing the QA Code Formatter as the default formatter for RB...
--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/va-smalltalk/C59IoRlsiRs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to va-smalltalk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/81bd99c7-e4ad-4547-bdef-eff977444032%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to va-sma...@googlegroups.com.
Hi Richard.I am slowly coming to this conclusion as well. RBFormatter formats RBProgramNodes. This can be Methods, but also smaller artefacts like Assignments, Blocks, Message sends etc. CfFormatter formats methods and "bigger" artefacts like Applications, etc.At first sight, it seems like RBProgramNodes somewhat map to EsParseNodes that are used in CfFormatter. If I understand correctly, ESParseNodes end up writing themselves onto a Stream in #formatOn: while RBFormatter implements he formatting for each kind of node in its #format*: protocol.So it seems what needs to be done is convert the RBNodes (after refactoring) to EsParseNodes and have those do their output. Seems like Richard's approach of subclassing RBFormatter with a Class that does this converson and implements the API of RBFormatter and delegates the actual formatting to the created EsPerseNodes is the way to go.
Not actually a trivial thing, and not what I'd call a hook ;-) I'll probably play around a little with this idea and see if I get anywhere...
To unsubscribe from this group and all its topics, send an email to va-smalltalk...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/46c1d049-df80-4cbe-a9fe-cf457cb9a850%40googlegroups.com.
I had posted something last August here in the forums about overriding the sourceString method of CompiledMethod to use the Envy QA formatter to allow people to see the code formatted the way they like without triggering a save every time it gets reformatted. Don't know if it is useful to anyone, but here's the link to the thread.....