Git Product home page Git Product logo

Comments (4)

jamesderlin avatar jamesderlin commented on April 28, 2024

I looked into the failures.

Failure type 1:

type 'List' is not a subtype of type 'Uint8List' of 'input'

ReplayRandomAccessFile currently uses const Passthrough<Uint8List>() for the #readSync converter. The input is a List<int> that isn't a Uint8List. I don't yet understand why.

Failure type 2:

No matching invocation found: readIntoSync(Instance(length:1024) of '_GrowableList', 0, null)

This happens because on the recording side, we write the event to the manifest after invoking the method, but the method mutates the supplied List argument, so we write the mutated argument, not the original one. The replay side then fails to find the corresponding entry since the List argument no longer matches.

from file.dart.

jamesderlin avatar jamesderlin commented on April 28, 2024

ReplayRandomAccessFile currently uses const Passthrough<Uint8List>() for the #readSync converter. The input is a List<int> that isn't a Uint8List. I don't yet understand why.

The data is serialized as a JSON array of integers, so I think an explicit conversion to Uint8List should be expected.

This happens because on the recording side, we write the event to the manifest after invoking the method,

Maybe RecordingProxyMixin.noSuchMethod could eagerly encode the argument lists to JSON and pass them directly to LiveMethodEvent.

from file.dart.

jamesderlin avatar jamesderlin commented on April 28, 2024

Ugh, there is yet another problem in that there's currently no way for record/replay to replicate mutations to method arguments. The recording site probably would need to encode the arguments before invocation and after, and then the replay side would need to figure out how to update arguments in-place. Or maybe there could be some less general mechanism since all of this would be needed only for RandomFileAccess.readInto/readIntoSync.

from file.dart.

jamesderlin avatar jamesderlin commented on April 28, 2024

This is no longer relevant since record/replay was removed by #162.

from file.dart.

Related Issues (20)

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.