Skip to content

Remove libevm import restriction test from graft/ post merge. #4541

@JonathanOppenheimer

Description

@JonathanOppenheimer

The test included added in ava-labs/coreth#1348, is a historical artifact, and it, and the script that was a precursor to it should be removed entirely, once its added to AvalancheGo

To add some historical context on why this test originally existed, here is some historical context from @ARR4N:

Originally it was [read: this test existed] because we were doing partial migrations of packages by using type aliases to the libevm equivalents.

type Foo pkg.Foo
// is different to
type Foo = pkg.Foo

The latter is an alias that is equivalent to dropping in pkg.Foo wherever Foo is used, whereas the former creates a new type that inherits (lay term; not OOP) the structure, but not the methods, of pkg.Foo.
As an example, the first things we ever migrated were params.ChainConfig and params.Rules but we still had to use all of the other coreth/params identifiers, so we blocked accidental import of libevm/params.

As the work to do this is largely complete, these are a historical artifact and should be removed.

There is one important exception which is the libevm/pseudo package. This should not be imported anywhere outside of libevm, without the express approval of @ARR4N, @StephenButtolph or @joshua-kim (as dictated by Arran himself).

It requires so much care to avoid catastrophic misuse and there are so few reasons to ever use it that I think it needs someone with a lot of Go experience to weigh in on approving it.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions