Skip to content

Build Error: Command PhaseScriptExecution failed with a nonzero exit code #61

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

Closed
Omega-Networks opened this issue Jun 11, 2023 · 4 comments

Comments

@Omega-Networks
Copy link

Omega-Networks commented Jun 11, 2023

Issue: Build Error
Fault Code: Command PhaseScriptExecution failed with a nonzero exit code
Environment: Xcode 15 beta (15A5160n)
OpenAPI Spec: https://github.com/meraki/openapi/blob/master/openapi/spec3.json

Summary:
Build error occurs when generating Cisco Meraki API spec using plugin.

Swift OpenAPI Generator configuration:

  • OpenAPI document path: */openapi.yaml
  • Configuration path: */openapi-generator-config.yaml
  • Generator modes: types, client
  • Output file names: Types.swift, Client.swift
  • Output directory: */SourcePackages/plugins/TestingOpenAPI.output/TestingOpenAPI/OpenAPIGenerator/GeneratedSources
  • Diagnostics output path: <none - logs to stderr>
  • Current directory: */TestingOpenAPI
  • Is plugin invocation: true
  • Additional imports:

Plugin Version:

swift-openapi-generator: 0.1.1
swift-openapi-runtime: 0.1.2
swift-openapi-urlsession: 0.1.0

Error:

12592:3: expected name in member access
Command PhaseScriptExecution failed with a nonzero exit code

Context:

12563 : /// Parsed a raw value that was not defined in the OpenAPI document.
12564 : case undocumented(String)
12565 : public init? ( rawValue : String ) {
12566 : switch rawValue {
12567 : case "":
12568 : self = .
12569 : case "full":
12570 : self = .full
12571 : case "half":
12572 : self = .half
12573 : default:
12574 : self = .undocumented(rawValue)
12575 : }
12576 : }
12577 : public var rawValue: String
12578 : {
12579 : switch self {
12580 : case let .undocumented(string):
12581 : return string
12582 : case .:
12583 : return ""
12584 : case .full:
12585 : return "full"
12586 : case .half:
12587 : return "half"
12588 : }
12589 : }
12590 : public static var allCases: [duplexPayload]
12591 : {
12592 : [., .full, .half]
12593 : }
12594 : }

Notes:

  • Many "similar" errors when generating the Netbox 3.5 OpenAPI spec. Will attach as another comment once documented.
@czechboy0
Copy link
Contributor

Hi @Omega-Networks, thank for filing the issue. From a quick glance, to me this looks like a duplicate of #33, which @simonjbeaumont has a fix ready for in #59.

@simonjbeaumont
Copy link
Collaborator

simonjbeaumont commented Jun 11, 2023

Thanks @Omega-Networks. I’ve merged #59 now and we’ll cut a release tomorrow. In the meantime would you be willing to verify this solves your issue by using main for your dependency?

EDIT: GitHub automatically closed the issue when I merged the PR but please feel free to reopen the issue and let us know if this hasn’t worked for you.

@simonjbeaumont
Copy link
Collaborator

@Omega-Networks thanks for your patience. Just to keep you in the loop, we're just letting #62 land before cutting the next release.

@simonjbeaumont
Copy link
Collaborator

@Omega-Networks this should now be fixed in release 0.1.2.

Thanks for the issue report.

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

3 participants