react-native-cached-image icon indicating copy to clipboard operation
react-native-cached-image copied to clipboard

On Maintenance and potential forking

Open fungilation opened this issue 5 years ago • 23 comments

I've been asked to make my fork official but haven't done such before. And I honestly don't want to waste my time, I have full time job(s). I'd do it if it's truly of value to the community and enough people want this repo to stay alive and updated (alongside RN updates which keep breaking this).

Looking at https://www.npmjs.com/package/react-native-cached-image, 3k downloads/week doesn't seem huge but not tiny either. So if there's interest:

  • Is @kfiroo completely unresponsive and out of reach, for transitioning maintenance of this repo?
  • If so, how best to transition community to new official fork?
  • If forking, new naming on npm: what should it be?

Let me know your thoughts. My fork is updated and tested to work in my own apps, up to RN 0.59.5: https://github.com/fungilation/react-native-cached-image/commits/master

fungilation avatar Apr 20 '19 16:04 fungilation

Hey, @fungilation I'm running RN 0.59.3 and I get a warning about AsyncStorage being extracted from rn core while using your fork. It seems it's dropped by react-native-clcasher which isn't maintained anymore. Can you do anything about this?

onedevlad avatar Apr 21 '19 13:04 onedevlad

Yes, I patched it with https://github.com/ds300/patch-package. Here's the resulting patch:

diff --git a/node_modules/react-native-clcasher/MemoryCache.js b/node_modules/react-native-clcasher/MemoryCache.js
index 4bb65b8..00a373e 100644
--- a/node_modules/react-native-clcasher/MemoryCache.js
+++ b/node_modules/react-native-clcasher/MemoryCache.js
@@ -1,5 +1,6 @@
 // import React, {Component} from 'react';
-import {AsyncStorage, Platform} from 'react-native';
+import {Platform} from 'react-native';
+import AsyncStorage from '@react-native-community/async-storage';
 
 const PREFIX = 'react-native-cacher:values:';
 const DEFAULT_EXPIRES = 999999;

fungilation avatar Apr 22 '19 02:04 fungilation

I think people will organically start using the fork that's active. Thanks for your contributions, it's definitely of value to the community.

bwillem avatar Apr 22 '19 12:04 bwillem

Thanks @fungilation running great on RN 0.59.5

  • Is @kfiroo completely unresponsive and out of reach, for transitioning maintenance of this repo?

2 years without nothing and 15 pending pull requests, let's assume he is unreachable 99% sure.

  • If so, how best to transition community to new official fork?

Try to create a npm dispute by explaining them the situation (https://docs.npmjs.com/misc/disputes.html) or just create a new repository with a new name and post an issue with a clear name saying "Repository has moved" or something..

  • If forking, new naming on npm: what should it be?

react-native-cached-image2 or react-native-cached-image-enhanced or whatever, the goal is to provide a working caching image module, anything will do the job I guess.

jr-k avatar May 01 '19 17:05 jr-k

Ok emailed Kfir and cc'ed [email protected]. I'd like to keep the same npm package name to not fragment userbase. Will see if Kfir actually respond to email, if not by github.

image

fungilation avatar May 01 '19 21:05 fungilation

@fungilation Hey, thank you for sending the email, my github account doesn't get as much attention as it should 😅 I've added you as a collaborator on github. Please send me your npm username and I'll add you as a maintainer there too

Sorry for the delayed response! 🙏

kfiroo avatar May 02 '19 16:05 kfiroo

Thanks @kfiroo. I believe I got all the permissions I need, including merge access here. I much prefer this over forking, no fragmenting the community either.

My npm username is garon

fungilation avatar May 02 '19 19:05 fungilation

@fungilation You are now a maintainer in npm too :)

kfiroo avatar May 05 '19 09:05 kfiroo

Is there npm package of that fork?

bendadaniel avatar May 13 '19 17:05 bendadaniel

@fungilation Any update on the npm fork thing? I currently installed from your github fork directly

paschaldev avatar May 17 '19 15:05 paschaldev

Can someone explain how to install the forked version if the fork is not going to be merged.

olinations avatar May 20 '19 19:05 olinations

package.json

"react-native-cached-image": "https://github.com/fungilation/react-native-cached-image.git#master"

Just a headsup. There seems to be some not so minor bugs in the fork when using the latest version of RN (0.59.8).

augustbjornberg avatar May 22 '19 13:05 augustbjornberg

Bugs such as? My app is using my fork, on RN 0.59.8.

I'm just too busy to merge my fork and do npm releases, will when I can.

fungilation avatar May 22 '19 14:05 fungilation

You can read about the bug here.

I've probably spent upwards of 10 hours just trying to figure out what causes it. If you could have a look at it that would be amazing @fungilation.

augustbjornberg avatar May 25 '19 20:05 augustbjornberg

👀 👀

stvmachine avatar May 27 '19 01:05 stvmachine

If anyone else is looking for an easy replacement for this module i can highly recommend react-native-fast-image. I was able to completely replace the now broken react-native-cached-image in my app in less than 30 minutes, with no noticeable loss in functionality. An added bonus is react-native-fast-image also seems to perform noticeably better, and has some nice additional features i might make use of in the future.

augustbjornberg avatar Jun 04 '19 01:06 augustbjornberg

@augustbjornberg Thanks for this. I'm adding it to my project right away

paschaldev avatar Jun 04 '19 13:06 paschaldev

I've used both a bit now and some difference I've noticed are

  • react-native-fast-image uses memory instead of file system for cacheing, which is why it's faster. if your app already has memory issues this will add to them. RNFI seems to manage its memory usage well so hasn't been an issue for me.
  • RNFI is not a drop-in replacement for ReactNative.Image, it has its own API.
  • RNFI is very sensitive to malformed URIs and will crash at runtime if it gets a string it doesn't recognize, so make sure you sanitize uris you're passing to it.

bwillem avatar Jun 17 '19 17:06 bwillem

Interesting comparison. Thanks!

react-native-cached-image been resilient and hasn't crashed on me yet in my app.

fungilation avatar Jun 17 '19 20:06 fungilation

I know this article might be a bit old, but I stumbled onto it while looking for memory leaks in my app and it turned out my app went from unexpectedly crashing to completely stable after I changed from react-native-fast-image to react-native-cached-image.

I'm still leaving the link here in case it might be useful to someone : https://www.freecodecamp.org/news/finding-memory-leaks-react-native-app-ios-46e6eeb50c8c/

c-ancia avatar Aug 16 '19 13:08 c-ancia

That's interesting. I was thinking of trying/switching to react-native-fast-image myself

fungilation avatar Aug 16 '19 14:08 fungilation

I could not reproduce the leaks in the above article. I assumed this was patched in an update, cause from what I can tell fast-image is cleaning up after itself properly now.

bwillem avatar Aug 16 '19 16:08 bwillem

Alright, then maybe I had an old version of the package installed.

c-ancia avatar Aug 16 '19 17:08 c-ancia