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

Report virtual path consistently between file.Resolvers #1836

Closed
wagoodman opened this issue May 23, 2023 · 1 comment · Fixed by #2287
Closed

Report virtual path consistently between file.Resolvers #1836

wagoodman opened this issue May 23, 2023 · 1 comment · Fixed by #2287
Assignees
Labels
bug Something isn't working
Milestone

Comments

@wagoodman
Copy link
Contributor

The VirtualPath element is sometimes populated in the directory resolver and othertimes (when it matches the RealPath) it is not populated. This field should always be populated and if there is a presentation reason to not show one for duplication reasons (which probably should not be the case) then this should be done in the presentation layer (when rendering the final format).

@wagoodman wagoodman added the bug Something isn't working label May 23, 2023
@wagoodman wagoodman added this to the Stabilize user surfaces milestone May 23, 2023
@wagoodman
Copy link
Contributor Author

Example (TODO: demonstrate with code example):

Sometimes you get this:

Location {
  RealPath: "/path/to/a"
  VirtualPath: "/path/to/a"
}

Othertimes you get this:

Location {
  RealPath: "/path/to/a"
  VirtualPath: ""
}

Depending on what file resolver you're using. This should be consistent across resolvers and the virtual path should always be provided (in my opinion) so that consumers can depend on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant