Skip to content

fix: Reference to undefined setting: scriptedKeepTempDirectory#1053

Open
EndlessLucky wants to merge 12 commits intofoundweekends:developfrom
EndlessLucky:olive-1049
Open

fix: Reference to undefined setting: scriptedKeepTempDirectory#1053
EndlessLucky wants to merge 12 commits intofoundweekends:developfrom
EndlessLucky:olive-1049

Conversation

@EndlessLucky
Copy link
Copy Markdown

[2.x] fix: initialize ScriptedPlugin settings for sbt 2 RC9

  • Problem
    Using sbt-giter8 with sbt.version=2.0.0-RC9 fails during load with:
    Reference to undefined setting: scriptedKeepTempDirectory from scripted.
    The plugin was wiring ScriptedPlugin.projectSettings manually, which leaves scripted settings initialization inconsistent on sbt 2 RC9.

  • Solution
    Require sbt.ScriptedPlugin directly in Giter8Plugin so scripted settings are initialized via plugin requirements, and remove the manual ScriptedPlugin.projectSettings ++ merge.
    Also update the sbt 2 cross-build target from 2.0.0-RC8 to 2.0.0-RC9 in build.sbt.

@EndlessLucky
Copy link
Copy Markdown
Author

@eed3si9n Would you please review this PR? Thanks.

Copy link
Copy Markdown
Member

@eed3si9n eed3si9n 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

override val requires = sbt.plugins.JvmPlugin && sbt.ScriptedPlugin

was the right approach

@xuwei-k xuwei-k changed the title [2.x] fix: Reference to undefined setting: scriptedKeepTempDirectory fix: Reference to undefined setting: scriptedKeepTempDirectory Mar 8, 2026
@EndlessLucky
Copy link
Copy Markdown
Author

@eed3si9n Would you please review this PR? Thanks.

@EndlessLucky
Copy link
Copy Markdown
Author

@eed3si9n Is there any way to run these checks automatically once push commits?

@EndlessLucky
Copy link
Copy Markdown
Author

@eed3si9n Is there any way to automate this workflow?

@eed3si9n
Copy link
Copy Markdown
Member

You can enable GitHub Actions on your forked repo or run the commands locally. First time pull requests are gated for security reasons.

@EndlessLucky
Copy link
Copy Markdown
Author

I enabled it and it was run successfully before. But it doesn't work now.

@EndlessLucky
Copy link
Copy Markdown
Author

@eed3si9n My forked repo's workflow was run successfully and this workflow is not started. Would you please take a look?

.jvmPlatform(
scalaVersions = Seq(scala3),
// sbt 2.x scripted-sbt resolution does not match sbt 1.x fixture projects; giter8 scripted is exercised on 2.12.
settings = Seq(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't disable sbt 2 tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants