Skip to content

SwiftGen 6.5.1 crash (installed via Mint) #905

Closed
@goodocy

Description

@goodocy

Hi.
Make a good tool, so I always use it well

Crash problems are found and reported.

image.yml

xcassets:
  inputs:
    - Resource/Test.xcassets
  outputs:
    - templateName: swift5
      output: Image/Image.swift

then

SwiftGenCLI/resource_bundle_accessor.swift:11: Fatal error: could not load resource bundle: from /Users/user/.mint/bin/SwiftGen_SwiftGenCLI.bundle or /private/var/folders/hy/_f54gj0n1ns2dttw7d19rl0m0000gn/T/mint/github.com_SwiftGen_SwiftGen/.build/arm64-apple-macosx/release/SwiftGen_SwiftGenCLI.bundle
[1]    74018 trace trap  swiftgen config run --config image.yml

and i found same result ( happens anywhere (with or without swiftgen.yml ) )

swiftgen template list
SwiftGenCLI/resource_bundle_accessor.swift:11: Fatal error: could not load resource bundle: from /Users/user/.mint/bin/SwiftGen_SwiftGenCLI.bundle or /private/var/folders/hy/_f54gj0n1ns2dttw7d19rl0m0000gn/T/mint/github.com_SwiftGen_SwiftGen/.build/arm64-apple-macosx/release/SwiftGen_SwiftGenCLI.bundle
[1]    74610 trace trap  swiftgen template list

after a little analysis, I got some hints

swiftgen bin

lrwxr-xr-x  1 user  staff    80B Dec  1 19:52 swiftgen -> /Users/user/.mint/packages/github.com_SwiftGen_SwiftGen/build/6.5.1/swiftgen
/Users/user/.mint/packages/github.com_SwiftGen_SwiftGen/build/6.5.1
drwxr-xr-x  3 user  staff    96B Dec  1 19:52 SwiftGen_SwiftGenCLI.bundle
-rwxr-xr-x  1 user  staff   5.1M Dec  1 19:52 swiftgen

And after moving to the actual path

./swiftgen template list -> success
swiftgen template list -> fail

It seems that swiftgen does not properly recognize the SwiftGen_SwiftGenCLI.bundle path when installing with mint

please check

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions