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

fix: JavaAppPackaging dependencies on Bash and Bat script plugins #1559

Conversation

jakubjanecek
Copy link

Use of bashScriptExtraDefines stopped working since sbt 1.9.7 which brought different order of auto plugins application (sbt/sbt@7beb23e). The reason seems to be that JavaAppPackaing plugin does not depend on BashStartScriptPlugin directly. Similar issue as encountered here: sbt/sbt-javaagent#28 (comment)

@lightbend-cla-validator
Copy link

Hi @jakubjanecek,

Thank you for your contribution! We really value the time you've taken to put this together.

We see that you have signed the Lightbend Contributors License Agreement before, however, the CLA has changed since you last signed it.
Please review the new CLA and sign it before we proceed with reviewing this pull request:

http://www.lightbend.com/contribute/cla

@jakubjanecek
Copy link
Author

I just signed the CLA.

@jakubjanecek
Copy link
Author

@muuki88 Can you please have a look at this PR so that we can merge it? Thanks.

muuki88
muuki88 previously approved these changes Dec 19, 2023
@muuki88
Copy link
Contributor

muuki88 commented Dec 19, 2023

Thanks for the ping. Seems I have missed it.

@jakubjanecek
Copy link
Author

@muuki88 Thanks. The build does not pass and I think it's because the tests run on older versions of sbt (there is a cross compilation to sbt 1.1.6) and which is not compatible with my change. Is it OK to remove the cross-compilation and update the tests to the latest version?

@muuki88
Copy link
Contributor

muuki88 commented Dec 19, 2023

@jakubjanecek the new dependencies seem to cause an error

[info] [error] sbt.AutoPluginException: Error determining plugins for project 'absolute-path' in /private/var/folders/qv/pdh5wsgn0lq3dp77zj602b5c0000gn/T/sbt_32fa5988/absolute-path:
[info] [error] Failed to sort List(sbt.plugins.CorePlugin, com.typesafe.sbt.packager.archetypes.JavaAppPackaging, com.typesafe.sbt.packager.rpm.RpmPlugin, com.typesafe.sbt.packager.archetypes.scripts.BashStartScriptPlugin, com.typesafe.sbt.packager.windows.WindowsPlugin, com.typesafe.sbt.packager.archetypes.scripts.BatStartScriptPlugin, com.typesafe.sbt.packager.docker.DockerPlugin, sbt.plugins.IvyPlugin, sbt.plugins.Giter8TemplatePlugin, com.typesafe.sbt.packager.debian.DebianPlugin, sbt.plugins.JvmPlugin, com.typesafe.sbt.packager.universal.UniversalPlugin, com.typesafe.sbt.packager.linux.LinuxPlugin, sbt.plugins.JUnitXmlReportPlugin, com.typesafe.sbt.SbtNativePackager) topologically

https://github.com/sbt/sbt-native-packager/actions/runs/7260349331/job/19779388174?pr=1559#step:5:938

Maybe you also need to update the sbt version that is running the tests?

@ghost
Copy link

ghost commented Dec 19, 2023

So after all this won't work. I haven't noticed that BashStartScriptPlugin and its Bat counterpart both depend on JavaAppPackaging so there is a cycle and that's why the tests fail. This can be fixed in some external plugin that can force the initialization order (which is what we are doing in our internal plugins) but it can't be done here directly.

@muuki88 I think we can close this PR (I don't have permission to do so) unless you have an idea how to resolve this.

@muuki88
Copy link
Contributor

muuki88 commented Dec 19, 2023

Oh no 😬 that's very unfortunate.

I have no other idea on how to fix this, unfortunately 🥲

@muuki88 muuki88 closed this Dec 19, 2023
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