[fpc-pascal] JSON RPC on Mac M1 fails

Hairy Pixels genericptr at gmail.com
Thu Mar 10 08:01:49 CET 2022


> On Mar 9, 2022, at 10:48 PM, Michael Van Canneyt via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
>> It breaks early on when sending the first message (initialize) which I register like this:
>> 
>> 	JSONRPCHandlerManager.RegisterHandler('initialize', TInitialize);
> 
> So you get an exception here ?

No that’s fine it’s when the client (Sublime Text) returns with the error below.

> 
>> 
>> And then the client returns back the message:
>> 
>> 	No class "initialize" with method "initialize" was found.
> 
> It's not normal that there is 2 times 'initialize' ?

So the class should be TInitialize right? That’s the class I registered so it makes sense it couldn’t find it if it thinks it’s called “initialize”.

> I fixed some bugs in the JSONRPC mechanism.
> Maybe you are now bumping into something that used to work by accident but
> which is now caught…


I’m building from 3.2.2 sources and I rebuilt for x86 (which runs on the M1 also) and the bug goes away so there’s something about this particular architecture.

Are there any tests I could run to try to figure this out? I’m not very familiar with the JSON RPC library except that I extended an already existing implementation.

Regards,
	Ryan Joseph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220310/701c0b43/attachment.htm>


More information about the fpc-pascal mailing list