Git Product home page Git Product logo

Comments (3)

johnfairh avatar johnfairh commented on June 6, 2024 1

Thanks a lot for tracking that down. I see it's a special case to do with Objective-C categories: sourcekitten has to figure out their key.name from their USR, which doesn't exist if the compilation errors out.

So, if you get your ObjC sourcekitten run working cleanly this should go away (some tips here if you need them) otherwise I think you'll have to manually knock out these json entries.

I'll add a fix on the jazzy side to cope with this bad json, but it's not localised to the method that crashed - the name is so important for organising things I think we'll have to just filter them out entirely and log a warning.

from jazzy.

johnfairh avatar johnfairh commented on June 6, 2024

Out of interest, what version of Xcode/Swift? I haven't done any testing with Xcode 14.1 yet.

The crash line says, I think, that a decl in the json, probably for a Swift extension is missing name which isn't supposed to happen (must be an extension of some nominal type).

Would be great if you can share the json, but understand if you can't/don't want to. Would be more defensive against weird json from the compiler to check against this property being missing.

from jazzy.

alkhimey avatar alkhimey commented on June 6, 2024

Hi,

Xcode version 13.4.1
When the JSON was produced with sourcekitten, I missed that it had ton of errors. Indeed the JSON has some weird results inside it.

Anyway, by elimination I was able to reduce it's size so I can just redact everything that is sensitive.

[
  {
    "" : {
      "key.diagnostic_stage" : "Redacted",
      "key.substructure" : [
        {
          "key.always_deprecated" : false,
          "key.always_unavailable" : false,
          "key.deprecation_message" : "",
          "key.doc.column" : 12,
          "key.doc.comment" : "Redacted",
          "key.doc.file" : "Redacted",
          "key.doc.full_as_xml" : "",
          "key.doc.line" : 59,
          "key.filepath" : "Redacted",
          "key.kind" : "sourcekitten.source.lang.objc.decl.category",
          "key.parsed_declaration" : "Redacted",
          "key.parsed_scope.end" : 188,
          "key.parsed_scope.start" : 59,
          "key.substructure" : [
            {
              "key.always_deprecated" : false,
              "key.always_unavailable" : false,
              "key.deprecation_message" : "",
              "key.doc.column" : 53,
              "key.doc.comment" : "Redacted",
              "key.doc.file" : "Redacted",
              "key.doc.full_as_xml" : "",
              "key.doc.line" : 185,
              "key.filepath" : "Redacted",
              "key.kind" : "sourcekitten.source.lang.objc.decl.property",
              "key.name" : "redacted",
              "key.parsed_declaration" : "Redacted",
              "key.parsed_scope.end" : 185,
              "key.parsed_scope.start" : 185,
              "key.unavailable_message" : "",
              "key.usr" : ""
            }
          ],
          "key.unavailable_message" : "",
          "key.usr" : ""
        }
      ]
    }
  }
]

from jazzy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.