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

feat(nargo)!: Replace --contracts flag with contract package type #2204

Merged
merged 3 commits into from
Aug 8, 2023

Conversation

phated
Copy link
Contributor

@phated phated commented Aug 8, 2023

Description

Problem*

Ref #2075

Summary*

This implements the contract package type in Nargo.toml but only replaces the --contracts flag on nargo compile; it doesn't implement contract support for other commands.

Technically this could close #2075 since we only supported nargo compile for contracts, but I think we should work to support the contract package type uniformly across all commands. I've started diving down this rabbit hole but there are still some unanswered questions so I wanted to unblock @Ethan-000's #2088 without causing unnecessary churn.

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.

The --contracts flag was removed from the nargo compile command and instead the contract package type needs to be specified in Nargo.toml

Additional Context

PR Checklist*

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

TomAFrench
TomAFrench previously approved these changes Aug 8, 2023
@TomAFrench TomAFrench enabled auto-merge August 8, 2023 17:50
@TomAFrench TomAFrench disabled auto-merge August 8, 2023 17:52
@TomAFrench
Copy link
Member

We don't have a --contract flag for new projects here right?

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.

LGTM. Can create new contract projects and compile.

@TomAFrench TomAFrench enabled auto-merge August 8, 2023 18:07
@TomAFrench TomAFrench added this pull request to the merge queue Aug 8, 2023
Merged via the queue into master with commit 968e12c Aug 8, 2023
@TomAFrench TomAFrench deleted the phated/contract-package-type branch August 8, 2023 18:37
TomAFrench added a commit that referenced this pull request Aug 10, 2023
* master: (80 commits)
  fix: properly capture lvalues in closure environments (#2120) (#2257)
  fix: Optimize contracts built by `nargo info` (#2259)
  chore: impl Display for DebugType (#2258)
  chore: update `noir_wasm` build process to match `acvm_js` (#2067)
  feat: Implement traits - parser support #2094 (#2230)
  chore: Refactor DefCollector duplicate errors (#2231)
  chore: Address clippy warnings (#2246)
  feat: Support `contract` package type in `nargo info` command (#2249)
  feat: Add slice append (#2241)
  chore: Bump `async-lsp` to v0.0.5 (#2186)
  chore: Move the remaining `nargo_cli` lib funcs into `nargo` crate (#2225)
  chore: Add test for eddsa (#2237)
  chore: Split `Nargo.toml` operations into separate package (#2224)
  fix(stdlib): correct `tecurve::contains` formula (#1821)
  feat: Remove `comptime` and warn upon usage (#2178)
  fix: Remove last vestige of array of structs to struct of arrays conversion (#2217)
  fix: Add foreign impl error (#2216)
  feat(nargo)!: Replace `--contracts` flag with `contract` package type (#2204)
  feat: Optimize `x < 0` for unsigned `x` to false (#2206)
  fix: Initialize numeric generics' type to a polymorphic integer when used in an expression (#2179)
  ...
TomAFrench added a commit that referenced this pull request Aug 11, 2023
* master:
  feat: Add slice append (#2241)
  chore: Bump `async-lsp` to v0.0.5 (#2186)
  chore: Move the remaining `nargo_cli` lib funcs into `nargo` crate (#2225)
  chore: Add test for eddsa (#2237)
  chore: Split `Nargo.toml` operations into separate package (#2224)
  fix(stdlib): correct `tecurve::contains` formula (#1821)
  feat: Remove `comptime` and warn upon usage (#2178)
  fix: Remove last vestige of array of structs to struct of arrays conversion (#2217)
  fix: Add foreign impl error (#2216)
  feat(nargo)!: Replace `--contracts` flag with `contract` package type (#2204)
  feat: Optimize `x < 0` for unsigned `x` to false (#2206)
  fix: Initialize numeric generics' type to a polymorphic integer when used in an expression (#2179)
  chore(nargo)!: remove `flat_witness` feature flag (#2208)
  chore: Revert "feat: Only create new witnesses for distinctiveness when duplicates exist" (#2209)
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.

Contract should be a CrateType instead of a flag and specified in Nargo.toml
2 participants