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

Use sbt native thin client for sbt >= 1.4 #58

Merged
merged 9 commits into from
May 16, 2021
Merged

Conversation

steinybot
Copy link
Contributor

I saw this tweet by Eugene and didn't realise that this was a thing. I thought it would be a cool default for sbt-github-actions.

@steinybot
Copy link
Contributor Author

Woops. olafurpg/setup-scala@v10 doesn't install sbtn yet.

@steinybot
Copy link
Contributor Author

Arghh this doesn't work as expected either.

It ends up doing:

Run sbt --client ++2.12.13 scalafmtCheckAll scalastyle
[info] entering *experimental* thin client - BEEP WHIRR
[info] terminate the server with `shutdown`
> ++2.12.13 scalafmtCheckAll scalastyle
[error] Expected ';'
[error] ++2.12.13 scalafmtCheckAll scalastyle
[error]                                      ^
[error] Total time: 0 s, completed Mar 24, 2021, 9:35:06 AM

Which returns a 0 exit code and doesn't fail the GitHub step.

@steinybot
Copy link
Contributor Author

Multi-command handling issue: sbt/sbt#5969
Exit code zero issue: sbt/sbt#6196

@steinybot
Copy link
Contributor Author

Latest commit works around sbt/sbt#5969.

Should probably hold off merging this until sbt/sbt#6196 is fixed otherwise builds will have false positives. We can exclude the buggy 1.4.x versions from using sbtn.

@djspiewak
Copy link
Collaborator

Hmm, this is interesting! I think we should probably make it configurable as a separate setting. Maybe something like githubWorkflowUseSbtThinClient? And then we can set that to false for anything which is < 1.4 or in the set of buggy versions. What do you think?

@steinybot
Copy link
Contributor Author

Yeah sure that sounds good.

It doesn't look like it is a bug in sbt but in sbt-extras. I haven't succeeded in getting that recognised as a bug yet. I also raised olafurpg/setup-scala#36 to get sbtn support (I mistakenly thought sbt --client was the same thing but it's not).

@steinybot
Copy link
Contributor Author

Huh maybe I was right after all. The sbt docs seem to say that sbt --client does run the native thin client but only when using the official launcher.

@djspiewak djspiewak merged commit 1b5912c into sbt:main May 16, 2021
@steinybot steinybot deleted the sbtn branch May 16, 2021 20:43
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.

2 participants