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

Add e2e tests for JSON (IR) backend #883

Open
emil14 opened this issue Feb 16, 2025 · 0 comments
Open

Add e2e tests for JSON (IR) backend #883

emil14 opened this issue Feb 16, 2025 · 0 comments
Assignees
Labels

Comments

@emil14
Copy link
Collaborator

emil14 commented Feb 16, 2025

UPD: the bug is fixed in #874 but now we need to add e2e tests


neva build -target=json e2e/interface_with_imports/main

failed to compile: json: unsupported type: map[ir.PortAddr]ir.PortAddr

BTW name -target=json is a bit confusing, because among all program representation we emit intermediate one. Probably should be -target=ir. We can add options like (json would be the default format)

neva build -target=ir -format=json ...
neva build -target=ir -format=yaml ...
@emil14 emil14 added this to the Q1: Advanced dataflow patterns milestone Feb 16, 2025
@emil14 emil14 self-assigned this Feb 16, 2025
emil14 added a commit that referenced this issue Mar 3, 2025
- Fixed deadlock caused caused by bug in desugarer (unhandled case of using anonymous port `node -> ...` with `?` error-guard operator - when calling `getFirstOutportName` to get `node:port` sometimes we got `:err` which must've been skipped because of `?`)
- New cli flag `--emit-ir` added for `neva run` command, that allows to emit IR in yaml _while_ running the program to get the **exact same** IR that is actually executed (implementation and API needs to be refactored in the future)
  - E2E Test added 
- Fixed marshalling to JSON (and YAML added) of IR (related to #883) by adding missing method
- Added marshalling to YAML of IR
- Go updated to `1.24`
- `golangci-lint` updated to 1.64 (still no support for Go 1.24?)
- Minor refactor in desugarer - part of functionality moved from `src.Scope` (with fixes)
@emil14 emil14 changed the title JSON (IR) backend needs fixes Add e2e tests for JSON (IR) backend Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant