getappmap / appmap-ruby

AppMap client agent for Ruby
https://appland.org
Other
100 stars 13 forks source link

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

Open dustinbyrne opened 1 year ago

dustinbyrne commented 1 year ago

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
    }
  ]
}
kgilpin commented 1 year ago

Is this causing the missing sequence diagrams in the JS agent too?

On Fri, Jul 7, 2023 at 3:09 PM Dustin Byrne @.***> wrote:

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": "#" } }, { "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": "#" } }, { "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 } ] }

— Reply to this email directly, view it on GitHub https://github.com/getappmap/appmap-ruby/issues/331, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVC64GQNNS4373G4A6OGLXPBNIFANCNFSM6AAAAAA2CFZWC4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>