jpsim / SourceKitten

An adorable little framework and command line tool for interacting with SourceKit.
MIT License
2.31k stars 226 forks source link

Could not cast value of type 'Swift.String' (0x7ff8556a6848) to 'Swift.Dictionary<Swift.String, SourceKittenFramework.SourceKitRepresentable>' (0x7ff855e42708). #821

Open david-hm-morgan opened 2 weeks ago

david-hm-morgan commented 2 weeks ago

Please can anyone help to find a solution or workaround to an issue like this?

Could not cast value of type 'Swift.String' (0x7ff8556a6848) to 'Swift.Dictionary<Swift.String, SourceKittenFramework.SourceKitRepresentable>' (0x7ff855e42708).

    from /Users/jenkins/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/jazzy-0.15.1/lib/jazzy/sourcekitten.rb:229:in `run_sourcekitten'
    from /Users/jenkins/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/jazzy-0.15.1/lib/jazzy/doc_builder.rb:83:in `block (2 levels) in build'
    from /Users/jenkins/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/jazzy-0.15.1/lib/jazzy/doc_builder.rb:81:in `chdir'
    from /Users/jenkins/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/jazzy-0.15.1/lib/jazzy/doc_builder.rb:81:in `block in build'
    from /Users/jenkins/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/jazzy-0.15.1/lib/jazzy/doc_builder.rb:71:in `map'
    from /Users/jenkins/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/jazzy-0.15.1/lib/jazzy/doc_builder.rb:71:in `build'
    from /Users/jenkins/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/jazzy-0.15.1/bin/jazzy:16:in `<top (required)>'
    from /Users/jenkins/.rbenv/versions/3.2.2/bin/jazzy:25:in `load'
    from /Users/jenkins/.rbenv/versions/3.2.2/bin/jazzy:25:in `<main>'

Using:

david-hm-morgan commented 2 weeks ago

See https://github.com/realm/jazzy/issues/1399 pinpointing a crash in SourceKitten