We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
/
Describe the bug
Adding a path to an AbsoluteUrl should return a new AbsoluteUrl, not a Url.
AbsoluteUrl
Url
From the example below we see that the underlying objects are correct, but the type is not strict enough.
$ scala-cli repl --amm Loading... Welcome to the Ammonite Repl 2.5.4-15-f4a8969b (Scala 3.1.3 Java 19) @ import $ivy.`io.lemonlabs::scala-uri:4.0.2` import $ivy.$ @ import io.lemonlabs.uri.AbsoluteUrl import io.lemonlabs.uri.AbsoluteUrl @ import io.lemonlabs.uri.typesafe.dsl.* import io.lemonlabs.uri.typesafe.dsl.* @ val core = AbsoluteUrl.parse("http://www.w3.org/2001/sw/RDFCore") core: AbsoluteUrl = AbsoluteUrl( scheme = "http", authority = Authority(userInfo = None, host = DomainName(value = "www.w3.org"), port = None), path = AbsolutePath(parts = Vector("2001", "sw", "RDFCore")), query = QueryString(params = Vector()), fragment = None ) @ core / "sub" res18: Url = AbsoluteUrl( scheme = "http", authority = Authority(userInfo = None, host = DomainName(value = "www.w3.org"), port = None), path = AbsolutePath(parts = Vector("2001", "sw", "RDFCore", "sub")), query = QueryString(params = Vector()), fragment = None )
It works correctly with the removeEmptyPathParts method.
removeEmptyPathParts
@ core.removeEmptyPathParts() res19: AbsoluteUrl = AbsoluteUrl( scheme = "http", authority = Authority(userInfo = None, host = DomainName(value = "www.w3.org"), port = None), path = AbsolutePath(parts = Vector("2001", "sw", "RDFCore")), query = QueryString(params = Vector()), fragment = None )
The text was updated successfully, but these errors were encountered:
theon
No branches or pull requests
Describe the bug
Adding a path to an
AbsoluteUrl
should return a newAbsoluteUrl
, not aUrl
.From the example below we see that the underlying objects are correct, but the type is not strict enough.
It works correctly with the
removeEmptyPathParts
method.The text was updated successfully, but these errors were encountered: