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: create a consolidated options struct for Driver #908

Merged
merged 11 commits into from
Mar 6, 2023

Conversation

TomAFrench
Copy link
Member

@TomAFrench TomAFrench commented Feb 24, 2023

Related issue(s)

Resolves #

Description

Summary of changes

We're currently passing a set of boolean flags into Driver (and then on to Evaluator) for various compiler options. This causes a breaking change for these crates whenever we add or remove one of these flags.

This PR adds a CompileOptions struct which defines all of the options which may be passed to the compiler. It's non-exhaustive so we can modify this later without causing breaking changes. This struct can then be built using the CompileOptionsBuilder which allows users to override various options while otherwise using the default compiler settings.

Dependency additions / changes

I've added a dependency on derive_builder to derive a builder struct for CompileOptions.

Test additions / changes

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.
  • This PR requires documentation updates when merged.

Additional context

@TomAFrench
Copy link
Member Author

hmm, looks like the way I've done it requires all the options to be written before the command, i.e. nargo --allow-warnings execute which isn't ideal.

@TomAFrench TomAFrench marked this pull request as ready for review February 28, 2023 14:10
@TomAFrench TomAFrench requested a review from jfecher March 6, 2023 10:31
Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

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

👍

@TomAFrench TomAFrench added this pull request to the merge queue Mar 6, 2023
Merged via the queue into master with commit 7264e03 Mar 6, 2023
@TomAFrench TomAFrench deleted the driver-config branch March 6, 2023 19:45
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