sanko / At.pm

The Bluesky Protocol for Social Networking in Perl
https://metacpan.org/release/At
Artistic License 2.0
2 stars 1 forks source link

Building fails #1

Open jkramer opened 1 month ago

jkramer commented 1 month ago

cpanm At fails due to failing tests because of "unrecognised parameters", see build.log for the complete output/build log.

sanko commented 1 month ago

Yeah, the API was changing faster than I felt like keeping up with this past spring. Checking now, and it's slowed down a lot but there's a ton of major parts being designed and redesigned by the lead devs even now: https://github.com/bluesky-social/atproto/branches/active

jkramer commented 1 month ago

That sounds annoying, wouldn't that break all other clients all the time as well? I don't wanna get too deep into atproto, I'm mostly interested in using your Bluesky module built on top to post some simple automated status updates. Do you think there's a way to make that work with a little hack or something, or are the API changes too profound for a quick workaround?

sanko commented 1 month ago

No, it wouldn't. It's perl's new class system choking on unknown parameters. I was looking at one of two "solutions" a few months ago: generate classes dynamically (which I'm not sure is possible yet) by mirroring the latest versions of lexicons, or adding a filter between the JSON decoder and all constructors. I hate both of those ideas.

Way back when, I saw a few clients were bundling a snapshot of lexicons and generating code based on them but even if I'd done that, the module would have started failing within a month according to the scheduled Github Action because they added emailAuthFactor to login responses. If I'd used bless instead, everything would be fine but I only wrote At.pm to try out classes.

I would be amazing if atproto was versioned and there was a stable, production type backend I could count on...

sanko commented 1 month ago

Well, I tried to find out if this would always be fatal in future releases of perl (https://github.com/Perl-Apollo/Corinna/issues/110) and was told to "grin and bear it." I honestly don't think the designer(s) of perlclass understood what I was looking for and started handing out strange advice and warnings that made little sense even after I provided code examples to further clarify what I was asking.

Anyway, that's perl for you and above my pay grade so I'll just swap out object systems.

Bluesky is making the switch from their app password scheme to OAuth (https://github.com/bluesky-social/atproto/discussions/2656) so I'll need to do some heavy tinkering anyway.