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

does not work when there are spaces in the parent path #387

Open
raboof opened this issue Nov 20, 2019 · 5 comments
Open

does not work when there are spaces in the parent path #387

raboof opened this issue Nov 20, 2019 · 5 comments

Comments

@raboof
Copy link
Contributor

raboof commented Nov 20, 2019

[error] java.net.URISyntaxException: Illegal character in path at index 28: /home/aengelen/dev/akka-http docs/docs/src/main/paradox
[error]         at java.net.URI$Parser.fail(URI.java:2848)
[error]         at java.net.URI$Parser.checkChars(URI.java:3021)
[error]         at java.net.URI$Parser.parseHierarchical(URI.java:3105)
[error]         at java.net.URI$Parser.parse(URI.java:3063)
[error]         at java.net.URI.<init>(URI.java:588)
[error]         at com.lightbend.paradox.markdown.Path$.relativeLocalPath(Page.scala:234)
[error]         at com.lightbend.paradox.ParadoxProcessor.mapping$1(ParadoxProcessor.scala:413)
[error]         at com.lightbend.paradox.ParadoxProcessor.$anonfun$rootPageMappings$1(ParadoxProcessor.scala:418)
raboof added a commit to akka/akka-http that referenced this issue Nov 20, 2019
Though it still doesn't work for the docs due to
lightbend/paradox#387
raboof added a commit to akka/akka-http that referenced this issue Nov 20, 2019
* Allow publishing from a folder with spaces

Though it still doesn't work for the docs due to
lightbend/paradox#387

* Also check that rsync succeeded
@brownnrl
Copy link

Would adding a replace ' ', '%20' at the link below be a possible fix?

@raboof
Copy link
Contributor Author

raboof commented Apr 22, 2021

I don't know - is it possible for you to test?

@brownnrl
Copy link

Yeah, I'll test it. Haven't done much in the way of sbt-plugin development.

I cloned out the repo and ran an sbt compile / test, and the following tests failed:

[info] Tests: succeeded 204, failed 22, canceled 0, ignored 0, pending 0
[info] *** 22 TESTS FAILED ***
[error] Failed tests:
[error]         com.lightbend.paradox.markdown.FrontinSpec
[error]         com.lightbend.paradox.markdown.SnipDirectiveSpec
[error]         com.lightbend.paradox.markdown.SnippetIndentationTest
[error]         com.lightbend.paradox.markdown.GitHubDirectiveSpec
[error]         com.lightbend.paradox.markdown.IndexSpec
[error] (tests / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 17 s, completed Apr 22, 2021 9:17:48 AM

All the failures had the same stack trace on a windows 10 box, scala 2.12 running sbt 1.5 which grabbed sbt 1.4.7.

[info]   java.net.URISyntaxException: Illegal character in path at index 13: /Users/(my username with spaces)/projects/paradox/.
[info]   at java.net.URI$Parser.fail(Unknown Source)
[info]   at java.net.URI$Parser.checkChars(Unknown Source)
[info]   at java.net.URI$Parser.parseHierarchical(Unknown Source)
[info]   at java.net.URI$Parser.parse(Unknown Source)
[info]   at java.net.URI.<init>(Unknown Source)
[info]   at com.lightbend.paradox.markdown.Path$.relativeLocalPath(Page.scala:235)

Probably adding a specific whitespace inclusive test to the PathSpec would be warranted.
https://github.com/lightbend/paradox/blob/e2e5b64a20d39afd88f81f1d29ecb5786005f640/tests/src/test/scala/com/lightbend/paradox/markdown/PathSpec.scala

I'll let you know where I get and will create a PR if string replacement into the URI fixes it.

@brownnrl
Copy link

Adding a simple additional replace call to .repalce('\\','/').replace(" ", "%20") fixed one test and then caused some missing resource stack traces. I'm at the end of time I can allot to it today, and I'm not sure when I will come back to it so I'll attach these sbt test results with that one change to put a pin in it for the time being.
test_results.txt
.

@raboof
Copy link
Contributor Author

raboof commented Apr 23, 2021

I'm at the end of time I can allot to it today, and I'm not sure when I will come back to it so I'll attach these sbt test results with that one change to put a pin in it for the time being.

Thanks for nudging this forward!

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

No branches or pull requests

2 participants