Giter Site home page Giter Site logo

Comments (13)

jbmaxwell avatar jbmaxwell commented on July 22, 2024 1

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.

jbmaxwell avatar jbmaxwell commented on July 22, 2024

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.

RemoteStorage.swift.zip

from shallows.

jbmaxwell avatar jbmaxwell commented on July 22, 2024

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.

dreymonde avatar dreymonde commented on July 22, 2024

Hi @jbmaxwell! I’ll take a look at your test project in a second

from shallows.

jbmaxwell avatar jbmaxwell commented on July 22, 2024

Sorry, not a test project actually, just the one file... but maybe you'll notice something right away.

from shallows.

dreymonde avatar dreymonde commented on July 22, 2024

@jbmaxwell maybe this

completion(fail(with: Error.remoteSaveError))

Can you try to instead use completion(.failure(Error.remoteSaveError))?

from shallows.

dreymonde avatar dreymonde commented on July 22, 2024

Who knows, maybe public global fail interferes with some other code

from shallows.

dreymonde avatar dreymonde commented on July 22, 2024

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.

jbmaxwell avatar jbmaxwell commented on July 22, 2024

same error using completion(.failure(Error.remoteSaveError))

from shallows.

dreymonde avatar dreymonde commented on July 22, 2024

@jbmaxwell got it. But the problem is with this line only? If you just comment it out, does the error go away?

from shallows.

dreymonde avatar dreymonde commented on July 22, 2024

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.

jbmaxwell avatar jbmaxwell commented on July 22, 2024

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.

dreymonde avatar dreymonde commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.