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: remove path virtualization from FileManager #3169

Merged
merged 6 commits into from
Oct 16, 2023

Conversation

TomAFrench
Copy link
Member

Description

Problem*

Resolves

Summary*

I'm not sure what the purpose of wrapping PathBufs in VirtualPath was but its main effect is requiring us to reattach the noir file extension in a load of locations after it's stripped off in virtualisation.

This PR removes this layer of abstraction and we now maintain the .nr extension on our paths. This should help prevent broken paths from forgetting to re-add the extension in future.

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.

@TomAFrench TomAFrench requested a review from kevaundray October 16, 2023 09:16
@kevaundray
Copy link
Contributor

I think the rationale was so that you could:

  • Abstract away any filepath differences with windows and linux
  • If you wanted to, you could support files which are not in the filesystem by using the VirtualPath as an unique opaque identifier.

This code has changed significantly since then, so perhaps its fine to just remove it. Either way, if we need the above features, it would be better to re-implement VirtualPath again in the future with more intention.

* master:
  chore: refactor LSP crate layout (#3170)
@TomAFrench
Copy link
Member Author

Yeah, I think that we can reintroduce it later if necessary. It's entirely internal to the fm package anyway.

@kevaundray kevaundray added this pull request to the merge queue Oct 16, 2023
Merged via the queue into master with commit ea1b58c Oct 16, 2023
@kevaundray kevaundray deleted the tf/remove-virtualisation branch October 16, 2023 17:09
Sakapoi pushed a commit to Sakapoi/noir_fork that referenced this pull request Oct 19, 2023
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