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

release command #2784

Merged
merged 2 commits into from
Jul 20, 2022
Merged

release command #2784

merged 2 commits into from
Jul 20, 2022

Conversation

eed3si9n
Copy link
Contributor

@eed3si9n eed3si9n commented Jul 16, 2022

Problem

sbt 1.7.0 made ++ command more strict, making it not possible
to use +publishSigned as is.
This is because compiler plugin has much finer-grained
crossScalaVersions compared to the core libraries.

Solution

Make all subprojects as fine-grained as needed by the compiler plugins.
Adjust publishing by defining a custom command called release.

Note: CI_RELEASE / CI_SNAPSHOT_RELEASE need to be adjusted accordingly.

Problem
-------
sbt 1.7.0 made ++ command more strict, making it not possible
to use +publishSigned as is.
This is because compiler plugin has much finer-grained
crossScalaVersions compared to the core libraries.

Solution
--------
Make all subprojects as fine-grained as needed by the compiler plugins.
Adjust publishing by defining a custom command called release.
Copy link
Collaborator

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @eed3si9n ! I updated the release.yml to use the new command when releasing. I think this should work, though I wonder if there is anything that we can do to handle such situations by default in sbt?

Or maybe the use case here is super niche and quite legacy, so ultimately it's not a project structure we would want to recommend?

@tgodzik tgodzik merged commit 82e8d8e into scalameta:main Jul 20, 2022
@tgodzik
Copy link
Collaborator

tgodzik commented Jul 20, 2022

@eed3si9n I am trying to run the release, but it seems that each time it hangs https://github.com/scalameta/scalameta/runs/7433154721?check_suite_focus=true

Looks like memory issues, which we didn't encounter before. Each time the version changes it seems to take on more and more memory, probably due to some caching? Anyway to force sbt to free some memory?

@eed3si9n
Copy link
Contributor Author

I suggest you give it more memory. For example, this is what we use for sbt - https://github.com/sbt/sbt/blob/1.7.x/.github/workflows/ci.yml:

    env:
      JAVA_OPTS: -Xms800M -Xmx2G -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8
      JVM_OPTS: -Xms800M -Xmx2G -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8

@tgodzik
Copy link
Collaborator

tgodzik commented Jul 22, 2022

I suggest you give it more memory. For example, this is what we use for sbt - https://github.com/sbt/sbt/blob/1.7.x/.github/workflows/ci.yml:

    env:
      JAVA_OPTS: -Xms800M -Xmx2G -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8
      JVM_OPTS: -Xms800M -Xmx2G -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8

We have even higher memory set and it's still running out of memoery. I thought that it might have been the amount of classes being loaded up, so I increased -XX:ReservedCodeCacheSize but that didn't help.

Getting a lot of:

[warn] In the last 16 seconds, 8.898 (55.9%) were spent in GC. [Heap: 2.94GB free of 5.21GB, max 5.33GB] Consider increasing the JVM heap using `-Xmx` or try a different collector, e.g. `-XX:+UseG1GC`, for better performance.
[warn] one warning found

which is weird since it seems to have a lot of free memory. Why would it GC so heavily?

tgodzik added a commit to tgodzik/scalameta that referenced this pull request Jul 22, 2022
tgodzik added a commit to tgodzik/scalameta that referenced this pull request Jul 22, 2022
dos65 pushed a commit that referenced this pull request Jul 22, 2022
* Revert "Merge pull request #2792 from tgodzik/try-fix-release"

This reverts commit a505ec1, reversing
changes made to ddaf4cb.

* Revert "Merge pull request #2789 from tgodzik/fix-release"

This reverts commit a9ab5a7, reversing
changes made to 82e8d8e.

* Revert "Merge pull request #2784 from eed3si9n/wip/release"

This reverts commit 82e8d8e, reversing
changes made to 54c5f61.

* Revert "Merge pull request #2783 from tgodzik/update-sbt"

This reverts commit a78362e, reversing
changes made to 2717f56.
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.

None yet

2 participants