Skip to content
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

Double on Linux #22

Open
klevison opened this issue Sep 19, 2017 · 1 comment
Open

Double on Linux #22

klevison opened this issue Sep 19, 2017 · 1 comment

Comments

@klevison
Copy link

klevison commented Sep 19, 2017

Alembic doesn't cast Int value to Double on Linux (MacOS its ok).

JSONString:
{"op":"mcm","id":2,"clk":"AKUBANQBAN0B","pt":1505853621577,"mc":[{"id":"1.133562061","rc":[{"bdatb":[[0,3,214.98]],"id":1221386},{"bdatl":[[0,1.49,68.46]],"id":1221385}]}]}

Error:
typeMismatch(expected: Double, actualValue: 3, path: Path([1]))

Code:

struct BDAT: Parsable {

    var level: Int
    var price: Double
    var size: Double
    
    static func value(from json: JSON) throws -> BDAT {
        return try .init(
            level: json.value(for: [0]),
            price: json.parse(Double.self, for: [1])
            size: json.value(for: [2])
        )
    }
    
}

I've already tried: json.parse(Double.self, for: [1]) and json.parse(for: [1])

SO: Ubuntu 16.04
Swift: 3.1.1

@ra1028
Copy link
Owner

ra1028 commented Nov 19, 2017

@klevison
Sorry for the late reply.

Just released Alembic 3.2.0 and probably fixed that bug.
Please try it.

Thanks for your bug reports !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants