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

fix: allow for spaces in project name #2311

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

kasiaMarek
Copy link
Contributor

Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

That should work. Thanks!

@tgodzik tgodzik merged commit c928ba7 into scalacenter:main Apr 9, 2024
16 of 17 checks passed
@@ -21,7 +23,9 @@ object ProjectUris {
Left(s"URI '${projectUri}' has invalid format. Example: ${ProjectUris.Example}")
case Right(parsed) =>
parsed.headOption match {
case Some(Array("id", projectName)) => Right(state.build.getProjectFor(projectName))
case Some(Array("id", projectName)) =>
val name = URLDecoder.decode(projectName, StandardCharsets.UTF_8)

Choose a reason for hiding this comment

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

scala> java.net.URLDecoder.decode("a+a")
val res0: String = a a

is the space in the result expected and wanted here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, you're right URLDecoder.decode doesn't seem to correctly undo URI.quote.

Copy link
Contributor

Choose a reason for hiding this comment

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

We might need to port the class we have in Metals

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.

Project import failed when there's spaces in project name
3 participants