MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.97k stars 523 forks source link

Fix ppx_version tests #15616

Open georgeee opened 2 months ago

georgeee commented 2 months ago

Problem: ppx_version tests do not pass.

Solution: fix bounded_types usage and comment out a test that can't be trivially fixed.

Ideally, this commit is followed by another one that uncomments the bad_version_syntax_missing_versioned test execution.

Explain how you tested your changes:

Checklist:

georgeee commented 2 months ago

@nholland94 could you explain your motivation for the change https://github.com/MinaProtocol/mina/pull/15195/files#diff-4639a9ab80fa8921be722da5501c054606e7c4cea41eab2134f9669492f052ee (part of #15195)?

It is the reason for test bad_version_syntax_missing_versioned failing. AFAIU, we do not check for %%versioned wrapping existence after your commit (and this is why the test is failing).

If this is intentional, docs have to be updated. And also function is_versioned_type_lident (and maybe some others too) are to be removed as unused code.

It seems to me though that the change wasn't intentional. Is there a problem if I just revert your whole change to src/lib/ppx_version/lint_version_syntax.ml?