Skip to content

chore: Replace resolve_path function with a trait that impls normalize#2157

Merged
TomAFrench merged 5 commits intomasterfrom
phated/path-normalize-trait
Aug 4, 2023
Merged

chore: Replace resolve_path function with a trait that impls normalize#2157
TomAFrench merged 5 commits intomasterfrom
phated/path-normalize-trait

Conversation

@phated
Copy link
Contributor

@phated phated commented Aug 3, 2023

Description

Problem*

Resolves

Summary*

While trying to integrate #2156 into Nargo CLI toml resolution, I found that it was a bad API due to the current way that Nargo CLI reads from the filesystem.

Instead of using that API, I believe we should implement normalize on PathBuf and &Path so we can import the trait to normalize any paths we have in the codebase.

Sorry for the 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.

Additional Context

PR Checklist*

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

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

@TomAFrench TomAFrench enabled auto-merge August 4, 2023 12:14
@TomAFrench TomAFrench added this pull request to the merge queue Aug 4, 2023
Merged via the queue into master with commit a6549a2 Aug 4, 2023
@TomAFrench TomAFrench deleted the phated/path-normalize-trait branch August 4, 2023 13:38
TomAFrench added a commit that referenced this pull request Aug 4, 2023
* master: (50 commits)
  chore: update stale comment on `create_circuit` (#2173)
  chore: Replace `resolve_path` function with a trait that impls normalize (#2157)
  chore: clippy fix (#2174)
  feat!: Allow specifying new package name with `--name` flag (#2144)
  chore!: remove unused flags on LSP command (#2170)
  chore: Hide the `show_ssa` and `show_brillig` flags (#2171)
  chore: bump `clap` to 4.3.19 (#2167)
  chore: Move the long line of `nargo info` to `long_about` (#2151)
  chore: Refactor `normalize_path` into an API on FileManager (#2156)
  fix: Implement slices of structs (#2150)
  chore: Refreshed ACIR artifacts (#2148)
  chore: Rebuild ACIR test artifacts (#2147)
  chore: remove short flags for `--show-ssa` and `--deny-warnings` (#2141)
  chore: replace usage of `Directive::Quotient` with brillig opcode  (#1766)
  chore: clippy fix (#2136)
  feat: Initial work on rewriting closures to regular functions with hi… (#1959)
  chore: Decouple acir blockid from ssa valueid (#2103)
  chore: Initialize copy array from previous values in `array_set` (#2106)
  chore: rename `ssa_refactor` module to `ssa` (#2129)
  chore: Use `--show-output` flag on execution rather than compilation  (#2116)
  ...
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