plugeth/rlp
Felix Lange 909dd4a109
rlp/rlpgen: remove build tag (#28106)
* rlp/rlpgen: remove build tag

This tag was supposed to prevent unstable output when types reference each other. Imagine
there are two struct types A and B, where a reference to type B is in A. If I run rlpgen
on type B first, and then on type A, the generator will see the B.EncodeRLP method and
call it. However, if I run rlpgen on type A first, it will inline the encoding of B.

The solution I chose for the initial release of rlpgen was to just ignore methods
generated by rlpgen using a build tag. But there is a problem with this: if any code in
the package calls EncodeRLP explicitly, the package can't be loaded without errors anymore
in rlpgen, because the loader ignores it. Would be nice if there was a way to just make it
ignore invalid functions during type checking (they're not necessary for rlpgen), but
golang.org/x/tools/go/packages does not provide a way of ignoring them.

Luckily, the types we use rlpgen with do not reference each other right now, so we can
just remove the build tags for now.
2023-09-14 12:28:40 +02:00
..
internal/rlpstruct all: fix docstrings 2022-10-04 09:18:02 +02:00
rlpgen rlp/rlpgen: remove build tag (#28106) 2023-09-14 12:28:40 +02:00
decode_tail_test.go all: update license information 2016-04-15 09:48:05 +02:00
decode_test.go rlp: support for uint256 (#26898) 2023-03-17 06:51:55 -04:00
decode.go rlp: remove allocation of bytes.Reader in DecodeBytes (#27987) 2023-08-23 20:31:05 +02:00
doc.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
encbuffer_example_test.go rlp/rlpgen: RLP encoder code generator (#24251) 2022-02-16 18:14:12 +01:00
encbuffer.go rlp: use identical receiver names for encBuffer methods (#27430) 2023-06-07 12:40:06 +02:00
encode_test.go rlp: fix typos (#27484) 2023-06-16 15:21:43 +03:00
encode.go rlp: fix typos (#27484) 2023-06-16 15:21:43 +03:00
encoder_example_test.go rlp/rlpgen: RLP encoder code generator (#24251) 2022-02-16 18:14:12 +01:00
iterator_test.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
iterator.go all: add whitespace linter (#25312) 2022-07-25 13:14:03 +03:00
raw_test.go rlp: improve tests for Split functions (#26200) 2022-11-17 14:19:03 +01:00
raw.go p2p/discover: improve discv5 NODES response packing (#26033) 2022-11-07 19:19:02 +01:00
safe.go rlp: minor optimizations for slice/array encoding (#23467) 2021-08-25 19:01:10 +02:00
typecache.go rlp/rlpgen: RLP encoder code generator (#24251) 2022-02-16 18:14:12 +01:00
unsafe.go rlp: minor optimizations for slice/array encoding (#23467) 2021-08-25 19:01:10 +02:00