Skip to content

SourceFile converts File.separator #15064

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

Merged
merged 1 commit into from
Apr 29, 2022
Merged

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Apr 28, 2022

SourceFile normalizes the virtual path so that finding the last element always works.

The virtual path separator is always "/". (VirtualDirectory constructs a path that way.)

Previously, InteractiveDriver used Path to determine the simple "file name" component.

val virtualFile = new VirtualFile(path.getFileName.toString, path.toString)

Fixes #15055

[test_windows_full]

@som-snytt som-snytt mentioned this pull request Apr 28, 2022
@som-snytt
Copy link
Contributor Author

OK I verified under cygwin that it fails without and succeeds with this tweak. It's hard to read under the escape noise.

←[2K←[2K  | => scala3-language-server / Test / testOnly 6s
←[2K←[2A←[1000D←[0m[←[0m←[31merror←[0m] ←[0m←[0m        dotty.tools.languageserv
er.HoverTest←[0m←[0J
←[0J←[1000D
←[2K←[2K  | => scala3-language-server / Test / testOnly 6s
←[2K←[2A←[1000D←[0J←[0m[←[0m←[31merror←[0m] ←[0m←[0m(scala3-language-server / Te
st / ←[31mtestOnly←[0m) sbt.TestsFailedException: Tests unsuccessful←[0m←[0J
←[0J←[0m[←[0m←[31merror←[0m] ←[0m←[0mTotal time: 30 s, completed Apr 28, 2022, 1
0:42:24 AM←[0m←[0J

@som-snytt som-snytt marked this pull request as ready for review April 28, 2022 17:45
@som-snytt
Copy link
Contributor Author

This commit also removes some unused imports, because unused imports hasn't been merged yet.

@mbovel mbovel self-requested a review April 28, 2022 19:45
@griggt griggt merged commit 400427d into scala:main Apr 29, 2022
@som-snytt som-snytt deleted the tweak/hovertest branch April 29, 2022 12:12
@Kordyjan Kordyjan added this to the 3.2.0 milestone Aug 2, 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.

Nightly Dotty workflow of 2022-04-28 failed
4 participants