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

Operationalize Source compatibility suite #3608

Closed
Tracked by #3595
j1010001 opened this issue Oct 10, 2024 · 1 comment · Fixed by #3616
Closed
Tracked by #3595

Operationalize Source compatibility suite #3608

j1010001 opened this issue Oct 10, 2024 · 1 comment · Fixed by #3616
Labels

Comments

@j1010001
Copy link
Member

j1010001 commented Oct 10, 2024

Goal

Scope

  • Clone Git repo of repository of the ecosystem project
  • Update the configuration to use latest Cadence version
  • Run tests and ensure they pass

Context

@turbolent
Copy link
Member

@RZhang05 Some notes:

The current implementation (https://github.com/onflow/cadence/blob/master/compat/main.py) clones a repo, rewrites the import statements so they can be resolved to files in the cloned repo, and parses and typechecks the code.

Rewriting the import statements is brittle, because the code in the tested repo might change, frequently.

So to begin with, maybe we can just keep the repo cloning, and remove/disable the functionality in the suite that rewrites the import statements, parses, and typechecks.

Instead, as also @SupunS suggested, we can just run the test suite in the cloned repo, but with the latest/current Cadence version. For repos that have their tests written in Go (usually in a Go module in lib/go/test, e.g. https://github.com/onflow/flow-core-contracts/tree/master/lib/go/test), we can use go.mod replace statement to update the Cadence dependency. See https://go.dev/ref/mod#go-mod-file-replace. The go mod edit command can add/edit to go.mod file and add/edit the replace statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants