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: Correction of the siteRoot path #17297

Merged
merged 1 commit into from
May 29, 2023
Merged

Conversation

Dedelweiss
Copy link
Contributor

@Dedelweiss Dedelweiss commented Apr 18, 2023

  • For the first issue, when a user set ./docs to the default value of ScalaSettings, the code only took a value that was not the default siteRoot.nonDefault. To fix this, I put a getOrElse to try and get the default value.

  • For the second problem, I noticed when I cloned the code that the user was calling layouts that did not exist. Be careful with this as it can indeed produce an error. Solving this problem was enough to remove the non-existent layout calls.

Fixes: #15306

- Add a getOrElse to not only take a value that does not match the default.
@Dedelweiss Dedelweiss changed the title Correction of the siteRoot path WIP: Correction of the siteRoot path Apr 18, 2023
@Dedelweiss Dedelweiss marked this pull request as ready for review April 24, 2023 11:14
@Dedelweiss Dedelweiss changed the title WIP: Correction of the siteRoot path Fix: Correction of the siteRoot path Apr 24, 2023
@Dedelweiss Dedelweiss requested a review from ckipp01 April 24, 2023 11:15
Copy link
Member

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

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

Thanks for the pr @Dedelweiss! Is there any existing tests for passing in the siteRoot? If so it might be a good idea to add one passing in the default here just to show that this working as expected. Could you check this and get back?

@Dedelweiss
Copy link
Contributor Author

Dedelweiss commented May 11, 2023

Hi, in fact according to my research, I did not find any tests corresponding to the modifications of my RP. I also don't know how to test this. Knowing that I should not modify the Scaladoc.scala.

If you have any ideas I am interested, thank you very much.

@ckipp01
Copy link
Member

ckipp01 commented May 11, 2023

@Florian3k maybe you have some ideas here about an easy way to test this?

@Florian3k
Copy link
Contributor

@ckipp01 Unfortunately, I don't have any.

Copy link
Member

@ckipp01 ckipp01 left a comment

Choose a reason for hiding this comment

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

I'm honestly ok with just merging this. It makes sense and does seem to fix the issue. Creating an entire test setup to try and test this seems a bit unrealistic. Ideally there would already be a framework for this, but since there's not I don't really expect you to do it. This is a LGTM from me, but I'd also like @Florian3k to verify.

@julienrf julienrf requested a review from Florian3k May 25, 2023 15:23
Copy link
Contributor

@Florian3k Florian3k left a comment

Choose a reason for hiding this comment

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

I think Option(siteRoot.withDefault(siteRoot.default)) is equivalent to Option(siteRoot.get), but thats minor issue.
Otherwise LGTM

@ckipp01 ckipp01 merged commit 4e4552e into scala:main May 29, 2023
@Kordyjan Kordyjan added this to the 3.4.0 milestone Aug 2, 2023
Kordyjan pushed a commit that referenced this pull request Nov 17, 2023
- For the first issue, when a user set ./docs to the default value of
ScalaSettings, the code only took a value that was not the default
`siteRoot.nonDefault`. To fix this, I put a getOrElse to try and get the
default value.


- For the second problem, I noticed when I cloned the code that the user
was calling layouts that did not exist. Be careful with this as it can
indeed produce an error. Solving this problem was enough to remove the
non-existent layout calls.

Fixes: #15306
[Cherry-picked 4e4552e]
Kordyjan added a commit that referenced this pull request Nov 20, 2023
Backports #17297 to the LTS branch.

PR submitted by the release tooling.
@Kordyjan Kordyjan modified the milestones: 3.4.0, 3.3.2 Dec 14, 2023
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.

Scala doc fails to generate static site
4 participants