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

Support pre-build initialization #2862

Open
mtomko opened this issue Dec 27, 2022 · 1 comment
Open

Support pre-build initialization #2862

mtomko opened this issue Dec 27, 2022 · 1 comment

Comments

@mtomko
Copy link

mtomko commented Dec 27, 2022

TL;DR: if scala-steward could source a script before running sbt, repositories could set up any auth tokens or other things necessary for the build to succeed

Based on discussion here.

The poolq build currently uses the sbt-github-packages plugin to configure publishing to GitHub packages. That plugin requires some configuration in order to function and it's somewhat awkward in SBT to stub out or delay the initialization of those things, even though they're not needed by sbt in order to run the basic tests for the repository. In short, scala-steward shouldn`t care but due to limitations in the plugin, it ends up needing to in a way that's rather hard to avoid.

My suggestion is that if scala-steward had a way to run some sort of shell script in advance of running sbt test, a repository could put in place configuration settings that were necessary for the build to succeed, and putting control in the hands of the repository hopefully would allow the solution to be more general than simply setting a dummy GITHUB_TOKEN for repositories that happened to use GitHub packages.

I'd be interested in contributing such a feature, but I wanted to discuss a possible solution here before attempting anything.

@exoego
Copy link
Contributor

exoego commented Feb 9, 2023

Since Scala build tools (sbt, mill, etc) supports credential configuration, I think credentials should be configured in build tools (sbt, mill, etc) at user side.
I do not find a good justification for Scala Steward to run shell script just for configuring dummy credential.

If missing credentials affect Scala Steward, I think other tools such as running Scalafix in GitHub Action are also affected.
If credentials is configured properly in build tool, not only Scala Steward but other tools are happy.

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

No branches or pull requests

2 participants