Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract SigmaParser and deps into a new module #864

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

darkdrag00nv2
Copy link
Contributor

Ground work for #851

Extracted SigmaParser and its dependencies to a new module named parsers and added support for cross-compilation on it.

This was needed because in order to decode a ContractTemplate for EIP-5, we need to decode the SType from the JSON. Support for doing that is available in SigmaParser which needs to be available from the sdk module. This helps avoid the sdk module depending on the sc module.

@darkdrag00nv2
Copy link
Contributor Author

@aslesarenko This mostly works except one problem. The SigmaParserTest which I've moved to the parsers module has some test case that use the SigmaCompiler. See here. The parsers module can't depend on the sc module as the later already depends on the former.

I can see two solutions:

  1. Keep SigmaParserTest inside the sc module itself. Probably not ideal
  2. Move the test cases that do not need the SigmaCompiler to the parsers module and move the remaining to SigmaCompilerTest

Thoughts?

@aslesarenko
Copy link
Member

Move the test cases that do not need the SigmaCompiler to the parsers module and move the remaining to SigmaCompilerTest

@darkdrag00nv2 This sounds good.

@darkdrag00nv2 darkdrag00nv2 marked this pull request as ready for review February 16, 2023 20:00
@darkdrag00nv2
Copy link
Contributor Author

Ran the tests using +test and they all pass.

@darkdrag00nv2
Copy link
Contributor Author

+test still works.

@aslesarenko aslesarenko merged commit fe7319f into ergoplatform:develop Feb 22, 2023
@darkdrag00nv2 darkdrag00nv2 deleted the sigmaparser_module branch February 22, 2023 21:02
@aslesarenko aslesarenko mentioned this pull request Jun 8, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants