Skip to content

debug module not available #11

@aspiers

Description

@aspiers

The debug module is available in the real Aergo VM and in Brick, but if I try to use Ship to test code which uses it, it just gets treated as nil:

 TEST FAILURE                               Tue Feb 11 21:44:29 GMT 2020

  F  test/test1.lua 441:-1 - Message: attempt to index ? (a nil value)
     437 |    end
     438 |  end
     439 |
     440 |  local function check(got, expected)
     441 |    local callerinfo = debug.getinfo(2)
     442 |    local src = string.format("typecheck failure in %s %s",
     443 |                              callerinfo.namewhat, callerinfo.name)
     444 |    if (got and expected == 'address') then
     445 |      assertc(type(got) == 'string', "address must be string type")
     446 |      -- check address length

The debug module is extremely useful for helping to pinpoint errors (e.g. via debug.traceback()), so it would be great if it was available in the Ship Lua run-time.

Are there other modules which are available in the Aergo VM but not in Ship? If they are not at feature parity then it would be helpful to document the differences. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions