Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: At least some limited backward compatibility both ways #29

Open
davidgro opened this issue Aug 8, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@davidgro
Copy link

davidgro commented Aug 8, 2023

Describe the Bug
Currently according to the docs, the newest version of LASIM can't read or write to instances which are even a single Lemmy BackEnd version out of date, I would need to use an older version of LASIM for that which can't read or write to the newest B.E. version, However, the newest LASIM uses a new profile version that the older LASIM can't read...
So - There is no way for me to synchronize my subscriptions from an instance which has updated, to a second instance that hasn't updated to the absolute latest version of Lemmy.

Please support at least a couple older Backend versions in each version of the app, I'm not asking for supporting the entire version history of Lemmy, just 2-3 versions back to allow LASIM to work in the times when instances update on different schedules. For example, at the moment supporting 0.18.2 and 0.18.1 when 0.18.3 is the latest.

Information

LASIM Version LASIM Profile Version Supported Lemmy BE Version(s)
0.1.* 1 0.18.1 (rc.9+), 0.18.2
0.2.* 2 0.18.3

Lemmy Source Instance URL: lemmynsfw.com
Lemmy Source Instance Version: 0.18.3
Lemmy Target Instance URL: pornlemmy.com
Lemmy Target Instance Version: 0.18.2

Output of LASIM
I haven't even downloaded it yet, because I can see that it won't synchronize both directions, and I want it to work both directions.

@davidgro davidgro added the bug Something isn't working label Aug 8, 2023
@davidgro
Copy link
Author

davidgro commented Aug 9, 2023

A much worse alternatative (although it would be a nice addition to my main request) would be for each version to allow writing out to the previous profile version. (Including directly after reading a profile from disk). This would allow for a chain of old versions to access Any lemmy server version from after the feature is added.

@CMahaff CMahaff added enhancement New feature or request and removed bug Something isn't working labels Aug 10, 2023
@CMahaff
Copy link
Owner

CMahaff commented Aug 10, 2023

So unfortunately it'd be pretty difficult to pull this off.

Rust does allow me to import multiple copies of the Lemmy API, but in addition to all the code replication, there also has to be logic to determine which version of the API to use and I would need to translate all structures into non-Lemmy things. It just seems kind of messy overall, even to do just a few versions.

On the profile versions point, it would mean that on every Lemmy release I'd have to not only update the newest version, but at a minimum the previous version to understand the new version's format. Again, this seems like a lot of complexity having to generate multiple releases all the time, and might make it even more confusing for users trying to find which item to download.

Overall, I've so far maintained that keeping the tool (relatively) simple is important to ensure that releases are timely - I think releasing a new version of LASIM ASAP after a new Lemmy version is released is the most important thing since most instances update within the week. The more complex things we support, the harder it is to verify that new releases are working as intended, and the slower releases are. I.E. on every release I'd really need to spin up 3 Lemmy instances (one with each version) just to check that things are working as expected - right now I've just been able to leverage the Lemmy instances that already exist for my testing. I only have a few hours a week to work on LASIM, so that level of testing would slow things down a lot.

My hope has been, and continues to be, that profile changes will be rare. I know we just had one, but overall I would expect them to happen a lot less frequently than Lemmy API changes (it should basically only occur when there is a new setting on your Lemmy profile page). If this proves not to be the case I'd start being more open to cross-version support. I could also considering splitting profile settings into a unique file in the future since they are the primary cause of "profile changes" - subscriptions and blocks will probably never change in the file format, and this could be leveraged for better cross-version support.

I'll also add that a "hacky" way to fix your specific issue (go from profile v2 to profile v1) is to take your profile_v2.json, copy it to profile_v1.json then edit that file and remove the infinite_scroll_enabled entry - after that LASIM 0.1.* should be able to parse your file. Annoyingly manual, but it's a work-around.

I'll leave this issue open for the future, but I'll be honest that it is unlikely to be completed in the short-term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants