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

Latest sbt-site in scripted test #56

Merged
merged 5 commits into from
Feb 13, 2024
Merged

Latest sbt-site in scripted test #56

merged 5 commits into from
Feb 13, 2024

Conversation

mkurz
Copy link
Member

@mkurz mkurz commented Feb 12, 2024

@mdedetrich Makes the test fail.

@mkurz
Copy link
Member Author

mkurz commented Feb 12, 2024

Makes the test fail.

See

Error:  /tmp/sbt_deab5127/build.sbt:3: error: not found: value ParadoxSitePlugin
Error:  enablePlugins(ParadoxSitePlugin, ParadoxMaterialThemePlugin)
Error:                ^

This is because sbt-site, starting with v1.5, is now spilt into separate modules per site generator. See https://www.scala-sbt.org/sbt-site/migration-guide.html

So actually we need to use the dependency sbt-site-paradox, instead of just sbt-site.

@mdedetrich
Copy link
Contributor

Hmmm

@mkurz mkurz requested a review from mdedetrich February 12, 2024 12:04
@mkurz
Copy link
Member Author

mkurz commented Feb 12, 2024

Hmmm

Fix pushed, please approve if you are ok with that (also used sbt-site-paradox in project/plugins.sbt)

@mdedetrich
Copy link
Contributor

Still failing

@mkurz
Copy link
Member Author

mkurz commented Feb 12, 2024

Hmmm.. ok too fast:

[info] [error] Reference to undefined setting: 
[info] [error] 
[info] [error]   Paradox / paradox / mappings from Paradox / paradox / mappings (/tmp/sbt_cf3d212/build.sbt:6)
[info] [error]  

@mdedetrich Any idea?

@mdedetrich
Copy link
Contributor

@mdedetrich Any idea?

Nope but it sounds like its a breaking change so maybe for 1.0.x series and lets try to update to latest sbt-site 1.4.x series?

@mdedetrich
Copy link
Contributor

So I had a quick check and I think that sbt-site is not a dependency of this plugin but its rather used to update the project main website which is actually broken (see https://jonas.github.io/paradox-material-theme/).

Which means it doesn't really matter when we fix it, Ill look into it a bit later

@mdedetrich
Copy link
Contributor

Well thats another one to add onto the list...

@mkurz
Copy link
Member Author

mkurz commented Feb 12, 2024

... used to update the project main website which is actually broken (see https://jonas.github.io/paradox-material-theme/).

It's broken because we migrated the repo from github.com/jonas to github.com/sbt. The website is now hosted under https://sbt.github.io/sbt-paradox-material-theme/. However, this redirects to https://www.scala-sbt.org/sbt-paradox-material-theme/, and I have now idea why... @eed3si9n Do you know why?

@mkurz
Copy link
Member Author

mkurz commented Feb 12, 2024

Well thats another one to add onto the list...

sbt-site 1.5.x is hosted on maven central, so I think if we just find out what is causing the error (edit: and fix it 😉) we are good here.

@mkurz
Copy link
Member Author

mkurz commented Feb 12, 2024

@mdedetrich fyi, I pushed a commit to make sure we don't pull in sbt-paradox > 0.9.2 unintentionally, because sbt-site-paradox does just that: https://github.com/sbt/sbt-site/blob/v1.5.0/build.sbt#L131-L136

@eed3si9n
Copy link
Member

However, this redirects to https://www.scala-sbt.org/sbt-paradox-material-theme/, and I have now idea why... @eed3si9n Do you know why?

Because sbt uses GitHub Pages with www.scala-sbt.org domain, all GitHub Pages under the sbt organization show up as a directory under it like https://www.scala-sbt.org/sbt-native-packager/.

@mkurz
Copy link
Member Author

mkurz commented Feb 13, 2024

@mdedetrich fyi, I fixed this locally, will push tomorrow (need to clean up before, too tired now)

@mkurz
Copy link
Member Author

mkurz commented Feb 13, 2024

Fixed, it works now. See the last two commits I pushed.

Actually the sbt-site migration notes from 1.3.x -> 1.4.x gave the hints needed: https://www.scala-sbt.org/sbt-site/migration-guide.html#migrating-from-version-1-3-x-to-1-4-x

So first commit I used the Compile scoped instead of Paradox. The related PR causing this is sbt/sbt-site#148. Also, because of this change there is no need anymore to call ParadoxMaterialThemePlugin.paradoxMaterialThemeSettings(Paradox), I removed that note from the documentation.

Paradox integration now uses the same configuration scopes as the sbt-paradox plugin. Therefore when upgrading remove the Paradox configuration scope from all of the sbt-paradox settings. Note that sbt-site setting siteSubdirName is still configured under the Paradox configuration scope.

The second commit I just moved the markdown file into main folder, since this is the default now:

The default Paradox source directory has been changed to match the one defined in the sbt-paradox, which is src/main/paradox. To keep the previous default, add the following to the build: paradox / sourceDirectory := sourceDirectory.value

@mkurz
Copy link
Member Author

mkurz commented Feb 13, 2024

@mdedetrich I will go ahead and merge this, since I want to fix a sbt-web related problem.
If you want to see something changed we can do that in another PR.

@mkurz mkurz merged commit ac682e9 into sbt:main Feb 13, 2024
5 checks passed
@mkurz mkurz deleted the sbt-site branch February 13, 2024 11:35
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.

3 participants