gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
875 stars 355 forks source link

stdlibWhitelist is not kept in sync with new stdlib packages #668

Closed thehowl closed 2 months ago

thehowl commented 1 year ago

See #631 CI. The PR is failing because stdlibWhitelist in pkgs/gnolang/precompile.go is not kept in sync appropriately with the current state of the code, as authors of new packages often forget to add packages to this whitelist, which in turn makes the CI fail when these packages are actually used.

Additionally, there are some I imagine deprecated entries in stdlibWhitelist, such as encoding/xml and encoding/json, which are packages which are currently not supported in the gno stdlibs.

My proposal is to add a script which is run on the CI which ensures that this variable is kept in sync with the stdlibs directory (except for internal packages, of course) - and additionally is provided as a make command able to automatically adjust stdlibWhitelist in the source.

moul commented 1 year ago

👍 let's implement custom linters for our project's needs.

Regarding this specific case, I propose implementing a catch-all solution that involves a single CI rule to handle all code generation, followed by a global diff.

moul commented 1 year ago

Related with #743