Skip to content

Is the binary.napi_versions property being used correctly? #3

@shirakaba

Description

@shirakaba

Referring to these lines here:

"binary": {
"napi_versions": [
3
]
},

The binary field is documented on this third-party site. It sounds like it should be used together with the following cmake code:

add_compile_definitions(NAPI_VERSION=${napi_build_version})

However, it appears we're hard-coding that:

add_compile_definitions(-DNAPI_VERSION=4)

We should either omit it from the package.json altogether or feed it into CMakeLists as a variable.

My worry about it being in the package.json is that library authors might not understand what it's for and delete it by accident. Though if the CMakeLists.txt would take it as an optional variable and simply fall back to a given value if it's omitted, then we'd get the best of both worlds.

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