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

Set the default version to 9999.0.0-SNAPSHOT, pin all dependencies #1696

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

igordmn
Copy link
Collaborator

@igordmn igordmn commented Nov 26, 2024

These are preparation to build Compose 1.8.0-alpha01 from jb-main branch.

  1. Set the default version to 9999.0.0-SNAPSHOT. It is needed for pinning, more in the code comment.

Alternative
Move versioning from CI to libraryversions.toml. It will contain all next versions we need to publish, and they are always greater than the pinned versions. This requires some work and I didn't plan it in the short term.

Disadvantage
We can accidentally publish it to the dev repo. But users won't see it in the suggestions because it is -SNAPSHOT.

This is also true for the alternative, so we have this disadvantage anyway.

  1. Pin all dependencies to be able to not release them.

Not pinned dependencies:

  • collection (new API needed)
  • core (new lib core-uri)
  • shapes (no stable version)

Testing

  1. Build
./gradlew publishComposeJbToMavenLocal
  1. Check module files
  2. Sync and run the version on the desktop template
  3. run1, runDemo

// project("compose:ui") -> lifecycle-runtime-compose:2.8.4 -> compose.runtime:runtime:1.6.11
// project("compose:ui") -> project("compose:runtime")
// project("compose:runtime") should override compose.runtime:runtime:1.6.11 by default
"9999.0.0-SNAPSHOT"
Copy link
Member

Choose a reason for hiding this comment

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

It seems too dangerous for me.

Move versioning from CI to libraryversions.toml

Sounds much better

@igordmn igordmn changed the title Set the default version to 9999.0.0-SNAPSHOT, pin lifecycle in Compose UI to 2.8.4 Set the default version to 9999.0.0-SNAPSHOT, pin all dependencies Dec 2, 2024
@igordmn igordmn marked this pull request as ready for review December 2, 2024 11:31
@igordmn igordmn marked this pull request as draft December 2, 2024 11:36
@igordmn
Copy link
Collaborator Author

igordmn commented Dec 2, 2024

Figure out an easy way to publish 9999.0.0-SNAPSHOT:

  • add a library in settings.gradle without adding it on CI.

I will add a check for this, as the alternative (moving versioning from CI) requires 8x more time

…e UI to 2.8.4

These are preparation to build Compose 1.8.0-alpha01 from `jb-main` branch.

1. Set the default version to 9999.0.0-SNAPSHOT. It is needed for pinning, more in the code comment.

**Alternative**
Move versioning from CI to `libraryversions.toml`. It will contain all next versions we need to publish, and they are always greater than the pinned versions. This requires some work and I didn't plan it in the short term.

**Disadvantage**
We can accidentally publish it to the dev repo. But users won't see it in the suggestions because it is `-SNAPSHOT`.

This is also true for the alternative, so we have this disadvantage anyway.

2. Pin lifecycle to `2.8.4` in `jb-main` branch

**Alternatives**
- Change jetbrains.publication.version.LIFECYCLE=2.8.4 in gradle.properties (an option, but there is no verification that it uses the correct API)
- Don't pin, depend on the project version, which should be 2.9.0-alpha01 (but we need to publish Lifecycle, and CI for it is WIP)
- Create `release/1.8.0-alpha01`, pin there (doesn't work, because the current release process requires version increasing in the main branch after we create a `release` branch, to maintain ordering of release/dev builds)

**Disadvantages**
- "Go to definition" goes to the 2.8.4 library sources instead of the project sources.
- Can't use/test new changes in Lifecycle

Proper pinning guidelines proposal is WIP at the moment, we can discuss it later, and for now, agree on a working solution for 1.8.0-alpha01.

## Testing
1. Build
```
./gradlew publishComposeJbToMavenLocal -Pjetbrains.publication.version.COMPOSE=1.8.0-test1 -Pjetbrains.publication.libraries=COMPOSE
```
2. Check module files
3. Sync and run the version on the desktop template:
- lifecycle should be 2.8.4
- runtime should be the same that was built
Not pinned dependencies:
- collection (new API needed)
- core (new lib core-uri)
- shapes (no stable version)
Not pinned dependencies:
- collection (new API needed)
- core (new lib core-uri)
- shapes (no stable version)
@igordmn igordmn force-pushed the igor.demin/pin-lifecycle-in-compose branch from bc9a167 to 1f0684d Compare December 2, 2024 15:52
@igordmn igordmn requested a review from MatkovIvan December 2, 2024 16:18
@igordmn
Copy link
Collaborator Author

igordmn commented Dec 2, 2024

@MatkovIvan, could you look at the current state, so we able to merge it today?

  • I added a CI check for 9999.

  • Currently fixing one test on desktop. Not sure if it is flaky, or we broke behavior compatibility yet.

@igordmn igordmn marked this pull request as ready for review December 2, 2024 17:07
@igordmn
Copy link
Collaborator Author

igordmn commented Dec 2, 2024

It seems it was flaky

@igordmn igordmn merged commit b6eba02 into jb-main Dec 2, 2024
7 checks passed
@igordmn igordmn deleted the igor.demin/pin-lifecycle-in-compose branch December 2, 2024 17:48
MatkovIvan pushed a commit that referenced this pull request Dec 12, 2024
…1696)

These are preparation to build Compose 1.8.0-alpha01 from `jb-main`
branch.

1. Set the default version to 9999.0.0-SNAPSHOT. It is needed for
pinning, more in the code comment.

**Alternative**
Move versioning from CI to `libraryversions.toml`. It will contain all
next versions we need to publish, and they are always greater than the
pinned versions. This requires some work and I didn't plan it in the
short term.

**Disadvantage**
We can accidentally publish it to the dev repo. But users won't see it
in the suggestions because it is `-SNAPSHOT`.

This is also true for the alternative, so we have this disadvantage
anyway.

2. Pin all dependencies to be able to not release them.

Not pinned dependencies:
- collection (new API needed)
- core (new lib core-uri)
- shapes (no stable version)

## Testing
1. Build
```
./gradlew publishComposeJbToMavenLocal
```
2. Check module files
3. Sync and run the version on the desktop template
4. run1, runDemo
# Conflicts:
#	compose/animation/animation-core/build.gradle
#	compose/foundation/foundation-layout/build.gradle
#	compose/foundation/foundation/build.gradle
#	compose/material/material/build.gradle
#	compose/runtime/runtime/build.gradle
#	compose/ui/ui-graphics/build.gradle
#	compose/ui/ui-test-junit4/build.gradle
#	compose/ui/ui-test/build.gradle
#	compose/ui/ui-text/build.gradle
#	compose/ui/ui-unit/build.gradle
#	compose/ui/ui/build.gradle
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