You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scheme specific part of a local file URI is "//" + file.getPath, not just file.getPath. Because the code compares the scheme specific part of the user-provided URI against the path, this will not match the specified file URI in practice.
Given that the scheme of the classpath entry URI is ignored and assumed to be file:, File<->URI/URL conversions are tricky due to things like Windows UNC filenames, and the -doc-external-uris feature doesn't currently work as specified, I think the proper fix is to change the syntax and not go through URIs or URLs at all. Because users can figure out that an incorrect file URI like file:/home/user/demo.jar is accepted, it might be considered a breaking change, though.
The text was updated successfully, but these errors were encountered:
The syntax for -doc-external-uris is:
The test for this feature is broken because it incorrectly constructs a file URI:
https://github.com/scala/scala/blob/master/test/scaladoc/run/SI-191.scala#L34
The scheme specific part of a local file URI is "//" + file.getPath, not just file.getPath. Because the code compares the scheme specific part of the user-provided URI against the path, this will not match the specified file URI in practice.
https://github.com/scala/scala/blob/master/src/compiler/scala/tools/nsc/doc/Settings.scala#L266
https://github.com/scala/scala/blob/master/src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala#L1040
Given that the scheme of the classpath entry URI is ignored and assumed to be
file:
, File<->URI/URL conversions are tricky due to things like Windows UNC filenames, and the -doc-external-uris feature doesn't currently work as specified, I think the proper fix is to change the syntax and not go through URIs or URLs at all. Because users can figure out that an incorrect file URI likefile:/home/user/demo.jar
is accepted, it might be considered a breaking change, though.The text was updated successfully, but these errors were encountered: