-
Notifications
You must be signed in to change notification settings - Fork 0
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
IOType problems #325
Comments
Reopening. This is important to get right because I'm using PDL as an exemplar for instrumenting parts of GP. ProjectileIO and FieldIO are documented as "value-based serialization". That is not one of the 3 types of serialization at https://github.com/phetsims/phet-io/blob/main/doc/phet-io-instrumentation-technical-guide.md#serialization. Do you mean data-type serialzation? While ProjectileIO certainly looks like data-type serialization, I'm not convinced that FieldIO is data-type serialization. Data-type serialization does not typically use ProjectileIO doc is also missing the link to https://github.com/phetsims/phet-io/blob/main/doc/phet-io-instrumentation-technical-guide.md#serialization. |
I updated the documentation to answer the questions above, please review. |
I was trying to use this sim as an exemplar for instrumenting particle systems in phetsims/gas-properties#231. I noted the following problems:
(1) In Projectile.ts,
ProjectileIO
does not identify which type of serialization it uses, as described in https://github.com/phetsims/phet-io/blob/main/doc/phet-io-instrumentation-technical-guide.md#serialization.(2) In Field.ts,
type FieldStateObject
is missing, and the result is a lack of type checking:toStateObject(): object
is almost as bad as usingany
.applyState: ( field: Field, stateObject )
results instateObject: any
.(3) Also in Field.ts, the documentation for
FieldIO
does not link to https://github.com/phetsims/phet-io/blob/main/doc/phet-io-instrumentation-technical-guide.md#serialization.(4) All of the IOTypes are currently
public static
. They should bepublic static readonly
, e.g.:The text was updated successfully, but these errors were encountered: