Skip to content

Conversation

@anatoliykmetyuk
Copy link
Contributor

Previous mechanism for this inferred experimental capabilities
from the version of the compiler (SNAPSHOT or NIGHTLY permits
experimental). However this doesn't work in practice:
the version of the compiler is set by CI to a stable version only
when publish task is executed (not when test tasks are executed).
If we set the version as stable for community build as well,
the community projects will not be able to resolve it as they operate
against the locally published snapshot and not the official stable
release version.

Hence this solution adds another env var specifically to track
experimental features allowance.

@anatoliykmetyuk anatoliykmetyuk force-pushed the disallow-experimental-cb-projects-on-releases branch from 4e593b6 to ceacb57 Compare May 12, 2021 17:00
Previous mechanism for this inferred experimental capabilities from the version of the compiler (SNAPSHOT or NIGHTLY permits experimental). However this doesn't work in practice: the version of the compiler is set by CI to a stable version only when publish task is executed (not when test tasks are executed). If we set the version as stable for community build as well, the community projects will not be able to resolve it as they operate against the locally published snapshot and not the official stable release version. Hence this solution adds another env var specifically to track experimental features allowance.
@anatoliykmetyuk anatoliykmetyuk force-pushed the disallow-experimental-cb-projects-on-releases branch from ceacb57 to 2e0edfc Compare May 12, 2021 17:02
@anatoliykmetyuk anatoliykmetyuk requested a review from smarter May 17, 2021 08:21
- name: Disable experimental features on release
if: "github.event_name == 'push'
&& startsWith(github.event.ref, 'refs/tags/')"
run: echo "DISALLOW_EXPERIMENTAL_FEATURES=true" >> $GITHUB_ENV
Copy link
Member

Choose a reason for hiding this comment

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

Why not set RELEASEBUILD to yes like in publish_release here? That way we're actually testing with the version number we'll be using for publishing, and the existing compilerSupportExperimental flag should work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dottyVersion in Build.scala is set based on RELEASEBUILD. If it is a yes, publishLocal will publish the compiler locally without the -bin-SNAPSHOT prefix, thus breaking the community build. Hence the need for a separate env variable.

Copy link
Member

Choose a reason for hiding this comment

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

publishLocal will publish the compiler locally without the -bin-SNAPSHOT prefix, thus breaking the community build.

Why does this break the community build?

@anatoliykmetyuk anatoliykmetyuk self-assigned this Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants