Skip to content

cmd/toolexec: rewrite of packages that don't import errtrace #91

@prashantv

Description

@prashantv

As discussed in #17 (comment), toolexec can't be used to add new imports to a package.

However, we can workaround this using go:linkname which requires unsafe, and doesn't work for generic functions.

We can support this in an unsafe mode, probably using an allow list to determine what packages to rewrite.

Since go:linkName can't be used with generic functions, we can't use Wrap2 etc, we can try rewriting those to
use a normal Wrap call as suggested.

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