Comments (13)
geez... I'm about 99% certain I tried succeed(with: ())
... ? (i.e., (Stuff) -> Void
being synonymous with (Stuff) -> ()
) I'll keep that it mind for next time.
from shallows.
I think this actually relates to the Abort trap: 6
build errors I'm seeing (similar to here: #14 (comment)). I've seen a couple of posts in the wild that suggest these <unknown>:0: error: fatal error encountered while reading from module ...
errors might be related to subclassing, so I'm thinking maybe it has to do with the custom Storage I'm using (not a subclass, I know, but maybe?). It worked for a long time, but needed some changes with the latest version of Shallows. I've attached the file, in case you can see anything obvious... and maybe you can help with the original question (since that code is in here)! ;-)
Any help would be hugely appreciated as I'm completed blocked right now.
from shallows.
Okay, I've verified that the RemoteStorage.swift class is the problem, and managed to work around it for now. Would be great to understand why it's a problem, but I'm up and running again.
from shallows.
Hi @jbmaxwell! I’ll take a look at your test project in a second
from shallows.
Sorry, not a test project actually, just the one file... but maybe you'll notice something right away.
from shallows.
@jbmaxwell maybe this
completion(fail(with: Error.remoteSaveError))
Can you try to instead use completion(.failure(Error.remoteSaveError))
?
from shallows.
Who knows, maybe public global fail
interferes with some other code
from shallows.
Also not entirely sure what you mean here:
All I really want is to be able to fire some function in the caller on success, but I'm not clear on using ShallowsResult in this context...
I assume you already had this implemented with the older version of Shallows? If yes, can you share that code with me so that I can help you with migrating it to the current version 🙂
from shallows.
same error using completion(.failure(Error.remoteSaveError))
from shallows.
@jbmaxwell got it. But the problem is with this line only? If you just comment it out, does the error go away?
from shallows.
Oh, about this:
// Not sure how to implement this...
// completion(succeed(with: ""))
You'll need to call completion(succeed(with: ()))
This is just a weird thing about how Swift.Result
is implemented, because this is the Result<Void, Error>
, you need to do .success(())
(or succeed(with: ())
with Shallows)
from shallows.
Ah, no sorry... I kind of hijacked my own thread! :) That line alone isn't the problem, afaik. I ended up moving forward by avoiding that file altogether. So I'm really not sure exactly what's wrong with it. One of our devs added this class, and I was able to workaround it by adding a function to another, more general "RemoteDataController" class I already had. So I did that just to keep moving forward.
from shallows.
Ah, no sorry... I kind of hijacked my own thread! :) That line alone isn't the problem, afaik. I ended up moving forward by avoiding that file altogether. So I'm really not sure exactly what's wrong with it. One of our devs added this class, and I was able to workaround it by adding a function to another, more general "RemoteDataController" class I already had. So I did that just to keep moving forward.
Damn, this is weird. I took a look at the file and not really sure what can be the problem. My best guess is that this is due to some naming collision, maybe Firebase has something called RemoteStorage
internally, or something like that. Hard to tell. Great that you found a workaround by just removing the file! I'll close this for now but feel free to reopen if this happens again/you have a suggestion on why this was happening.
from shallows.
Related Issues (15)
- 3-layer composition? HOT 14
- Purge from memoryCache (while leaving in composed diskCache)? HOT 10
- Memory cache returns nothing HOT 4
- Archiving fails in Swift5 HOT 13
- Xcode 11.4.1, Swift 5.2.2 Abort trap: 6 points to Shallows HOT 1
- No mechanism for deleting from disk storage HOT 1
- Base64 encoding isn't great for filenames HOT 2
- Clear object from MemoryStorage? HOT 3
- Cocoapods? HOT 5
- Cache Expiration HOT 5
- Issue with combined cache creation and DiskFolderStorage HOT 2
- Memory limitations and responding to warnings with combined cache? HOT 5
- Clearer Error handling HOT 3
- update(forKey: ) is not thread safe HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shallows.