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

Improve error on conflict with Windows device names #9959

Merged
merged 1 commit into from Apr 19, 2022

Conversation

som-snytt
Copy link
Contributor

Minimal check on Windows and JVM backend.

Fixes scala/bug#4781

11721 asks for a lint on any platform, as a file (class or doc) could be extracted on an arbitrary Windows box.

Alternatively, it should always be possible to avoid writing the problematic file to the file system (by writing to a jar or in-memory).

@scala-jenkins scala-jenkins added this to the 2.13.9 milestone Mar 5, 2022
def warnSpecial(): Unit = frontendAccess.backendReporting.warning(NoPosition, s"path component is special Windows device: ${name}")
specials.findPrefixOf(name).foreach(prefix => if (prefix.length == name.length || name(prefix.length) == '.') warnSpecial())
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is windows but could still use a test. I think the request was always to warn, but almost everything is distributed via jar or zip. Unzip at your own risk.

Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lrytz lrytz marked this pull request as ready for review April 19, 2022 11:01
@lrytz lrytz merged commit 90c820f into scala:2.13.x Apr 19, 2022
@som-snytt som-snytt deleted the issue/4781 branch April 19, 2022 15:53
@SethTisue SethTisue changed the title Check for windows device names Improve error on conflict with Windows device names Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants