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

sbt-dependency-submission can handle multiple projects now #250

Merged

Conversation

mkurz
Copy link
Member

@mkurz mkurz commented Mar 24, 2023

@mkurz mkurz merged commit 4d1f639 into playframework:main Mar 24, 2023
@mkurz mkurz deleted the sbt-dependency-submission-multiple-projects branch March 24, 2023 11:16
@adpi2
Copy link

adpi2 commented Mar 24, 2023

Something went wrong when resolving the dependencies:

Failed to resolve the dependencies of compile-time-di_2.13
[error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.play:play-mailer_2.13:8.0.1+132-732c7a66-SNAPSHOT
[error]   Not found
[error]   Not found
[error]   not found: /home/runner/.ivy2/localcom.typesafe.play/play-mailer_2.13/8.0.1+132-732c7a66-SNAPSHOT/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/typesafe/play/play-mailer_2.13/8.0.1+132-732c7a66-SNAPSHOT/play-mailer_2.13-8.0.1+132-732c7a66-SNAPSHOT.pom

https://github.com/playframework/play-mailer/actions/runs/4510934505

@mkurz
Copy link
Member Author

mkurz commented Mar 24, 2023

@adpi2 The workflow is running now: https://github.com/playframework/play-mailer/actions/runs/4511227545/jobs/7943127376
However it is not working correctly: In the "dependency graph" view (https://github.com/playframework/play-mailer/network/dependencies) I can only see dependencies for "./runtimeDI/build.sbt", the other two build.sbt files are missing (root and the other sample).
Thinking about it, that totally makes sense:
We run the action three times, each time a new dependency graph snapshot gets submitted. Each snapshot overrides the previous one, therefore the last one wins...
IMHO the correct solution would look something like:

      - uses: scalacenter/sbt-dependency-submission@v2
        with:
          working-directory: .
          working-directory: ./samples/compile-timeDI/
          working-directory: ./samples/runtimeDI/
# or
      - uses: scalacenter/sbt-dependency-submission@v2
        with:
          working-directories: [".", "./samples/compile-timeDI/", "./samples/runtimeDI/" ]

That way the action only runs once, submitting only one snapshot that contains all the build.sbt files' dependencies.

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