Skip to content

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

Merged
phated merged 3 commits intomasterfrom
phated/remove-backend-from-driver
Jul 5, 2023
Merged

chore(driver): Remove backend dependence from driver construction#1846
phated merged 3 commits intomasterfrom
phated/remove-backend-from-driver

Conversation

@phated
Copy link
Copy Markdown
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
Copy Markdown
Contributor

How does this block dependency resolution?

@phated
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread crates/noirc_driver/src/lib.rs Outdated
Comment thread crates/noirc_driver/src/lib.rs Outdated
Comment thread crates/noirc_driver/src/lib.rs Outdated
Copy link
Copy Markdown
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