Skip to content

Closing quicktype's stdout makes it output an error in some cases #864

Open
@schani

Description

@schani
Marks-iMac:quicktype schani$ ./script/quickesttype --src-lang schema --lang swift --just-types ./test/inputs/schema/vega-lite.schema   | head -n 4
import Foundation

struct VegaLite {
    /// URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you

Issue in line 1390: quicktype cannot infer this type because there is no data about it in the input.
1390:     let on: Any?

Issue in line 1537: quicktype cannot infer this type because there is no data about it in the input.
1537:     let on: Any?

Issue in line 1585: quicktype cannot infer this type because there is no data about it in the input.
1585:     let on: Any?

Issue in line 4583: quicktype cannot infer this type because there is no data about it in the input.
4583:     let on: Any?
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1024:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:851:14)
Marks-iMac:quicktype schani$ ./script/quickesttype --lang swift --just-types ./test/inputs/json/samples/pokedex.json   | head -n 4
import Foundation

struct Pokedex {
    let pokemon: [Pokemon]
Marks-iMac:quicktype schani$ ./script/quickesttype --quiet --src-lang schema --lang swift --just-types ./test/inputs/schema/vega-lite.schema   | head -n 4
import Foundation

struct VegaLite {
    /// URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1024:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:851:14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIgood first issueNot necessarily easy, but doesn't require deep quicktype knowledge

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions