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

chore(driver): Remove backend dependence from driver construction #1846

Merged
merged 3 commits into from
Jul 5, 2023

Conversation

phated
Copy link
Contributor

@phated phated commented Jun 30, 2023

Description

Problem*

Resolves #1680

Summary*

This removes language and is_opcode_supported arguments from the construction of the Driver. This is a half-measure while #1394 is outstanding. I tried to update that PR with upstream changes and all the tests were failing, so we should merge this intermediate step so I can continue moving forwards on fixing dependency resolution inside the LSP.

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

While working on this, I noticed that we should be implementing Copy on the Language enum. See noir-lang/acvm#406

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@phated phated requested review from TomAFrench and kobyhallx June 30, 2023 22:13
@kevaundray
Copy link
Contributor

How does this block dependency resolution?

@phated
Copy link
Contributor Author

phated commented Jun 30, 2023

How does this block dependency resolution?

We want to store a Context and use references to it, which is leading me to pretty much remove Driver completely. Moving these values to function arguments makes this possible.

TomAFrench
TomAFrench previously approved these changes Jul 3, 2023
Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I've added some notes in a couple of places.

crates/noirc_driver/src/lib.rs Outdated Show resolved Hide resolved
crates/noirc_driver/src/lib.rs Outdated Show resolved Hide resolved
crates/noirc_driver/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@kobyhallx kobyhallx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@phated phated added this pull request to the merge queue Jul 5, 2023
Merged via the queue into master with commit 28c1fdb Jul 5, 2023
@phated phated deleted the phated/remove-backend-from-driver branch July 5, 2023 17:16
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.

Language and is_opcode_supported should not be required by a noirc driver
4 participants