-
Notifications
You must be signed in to change notification settings - Fork 509
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
Post update hooks have no effect #3213
Comments
Hey @MaciejG604, is that command generating new files our updating old ones? Because if that's the case I believe given this new files won't be added, and thus, a commit won't be created. |
Hi, it should only update files that already exists, nothing new added. |
🤔 Could you run Steward in debug mode to get more clarity onto what's happening? |
How do I do that? |
If you are using the Scala Steward GitHub Action, check |
I tried this locally with my dev instance and the post-update hook failed with:
Running the command in the shell works just fine but I can reproduce the above error with a simple Scala script: $ cat run.sc
val pb = new java.lang.ProcessBuilder("./mill", "-i", "'generate-reference-doc[]'.run")
pb.inheritIO
pb.start
$ scala-cli run run.sc
[build.sc] [50/59] zincReportCachedProblems
Parsing exception Position 1:1, found "'generate-" Maybe the public Scala Steward instance fails with the same error. And I've no idea why that does not happen with the GH Action. |
It works for me if the single quotes around postUpdateHooks = [{
- command = ["./mill", "-i", "'generate-reference-doc[]'.run"],
+ command = ["./mill", "-i", "generate-reference-doc[].run"],
commitMessage = "Generate the reference doc"
}] Please give this a try, @MaciejG604. |
@fthomas seems to be still broken, even with the single quotes removed.
I believe I tried to add the single quotes since they are necessary when running the command from the command line, manually. ./mill -i 'generate-reference-doc[]'.run Not sure what's the proper syntax for |
I need to run with logs turned on, will have that by tomorrow. |
Ok, if we are fortunate Scala Steward will raise a new PR in the scala-cli repo in that run and we'll see how the hook failed. If it won't raise a PR, we also won't see how the hook fails. |
I didn't get any info unfortunately, will have to run again |
looks like an issue with our build |
Or maybe the |
Looks like cs is somehow downloaded to a wrong place, but we could use the default one already installed. We use it to get the proper Java version (17 in our case) |
In the scala-cli repo we have updated our
.scala-steward.conf
to include:However, no commits with this message are ever generated e.g. here.
After setting up a separate steward-running repo, the hooks are launched correctly e.g. here.
The text was updated successfully, but these errors were encountered: