Skip to content

Packages of files don't create any CodeObject entries #331

@dustinbyrne

Description

@dustinbyrne

Given the following sample project: https://gist.github.com/dustinbyrne/c3943c4857d2ad65dea92c1c944da7d7

The following AppMap is generated containing an empty object within the classMap array. This prevents the sequence diagram from rendering.

{
  "version": "1.12.0",
  "metadata": {
    "app": "my-test",
    "language": { "name": "ruby", "engine": "ruby", "version": "3.1.0" },
    "client": {
      "name": "appmap",
      "url": "https://github.com/applandinc/appmap-ruby",
      "version": "0.99.4"
    }
  },
  "classMap": [{}],
  "events": [
    {
      "id": 1,
      "event": "call",
      "thread_id": 1820,
      "defined_class": "Test",
      "method_id": "demo",
      "path": "test.rb",
      "lineno": 7,
      "static": false,
      "parameters": [],
      "receiver": {
        "class": "Test",
        "object_id": 1800,
        "value": "#<Test:0x00007fce667ab2c8>"
      }
    },
    {
      "id": 2,
      "event": "call",
      "thread_id": 1820,
      "defined_class": "Test",
      "method_id": "print",
      "path": "test.rb",
      "lineno": 12,
      "static": false,
      "parameters": [
        {
          "name": "msg",
          "class": "String",
          "object_id": 1840,
          "value": "Hello World",
          "kind": "req"
        }
      ],
      "receiver": {
        "class": "Test",
        "object_id": 1800,
        "value": "#<Test:0x00007fce667ab2c8>"
      }
    },
    {
      "id": 3,
      "event": "return",
      "thread_id": 1820,
      "parent_id": 2,
      "elapsed": 4.868998075835407e-6,
      "elapsed_instrumentation": 5.296599920256995e-5
    },
    {
      "id": 4,
      "event": "return",
      "thread_id": 1820,
      "parent_id": 1,
      "elapsed": 7.210700277937576e-5,
      "elapsed_instrumentation": 7.861099584260955e-5
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions