Tool To Bump Stdlib Version (#1947)

This commit is contained in:
Radosław Waśko 2021-08-13 18:14:20 +02:00 committed by GitHub
parent bd04f8caf1
commit be6e60509a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
255 changed files with 444 additions and 132 deletions

View File

@ -168,6 +168,13 @@ jobs:
sleep 1 sleep 1
sbt --no-colors bootstrap sbt --no-colors bootstrap
- name: Update the Stdlib Version
working-directory: repo
shell: bash
run: |
sleep 1
sbt --no-colors "stdlib-version-updater/run update"
# Verify Legal Review # Verify Legal Review
- name: Verify Packages - name: Verify Packages
if: runner.os != 'Windows' # TODO [RW] CRLF handling in licenses task if: runner.os != 'Windows' # TODO [RW] CRLF handling in licenses task
@ -277,10 +284,10 @@ jobs:
sbt "enso/verifyGeneratedPackage engine ${{ env.ENGINE_DIST_DIR }}/THIRD-PARTY" sbt "enso/verifyGeneratedPackage engine ${{ env.ENGINE_DIST_DIR }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage launcher ${{ env.LAUNCHER_DIST_DIR }}/THIRD-PARTY" sbt "enso/verifyGeneratedPackage launcher ${{ env.LAUNCHER_DIST_DIR }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage project-manager ${{ env.PROJECTMANAGER_DIST_DIR }}/THIRD-PARTY" sbt "enso/verifyGeneratedPackage project-manager ${{ env.PROJECTMANAGER_DIST_DIR }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage Base ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Base/0.1.0/THIRD-PARTY" sbt "enso/verifyGeneratedPackage Base ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Base/${{ env.DIST_VERSION }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage Table ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Table/0.1.0/THIRD-PARTY" sbt "enso/verifyGeneratedPackage Table ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Table/${{ env.DIST_VERSION }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage Image ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Image/0.1.0/THIRD-PARTY" sbt "enso/verifyGeneratedPackage Image ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Image/${{ env.DIST_VERSION }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage Database ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Database/0.1.0/THIRD-PARTY" sbt "enso/verifyGeneratedPackage Database ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Database/${{ env.DIST_VERSION }}/THIRD-PARTY"
# Publish # Publish
- name: Compress the built artifacts for upload - name: Compress the built artifacts for upload

View File

@ -131,6 +131,13 @@ jobs:
sleep 1 sleep 1
sbt --no-colors verifyLicensePackages sbt --no-colors verifyLicensePackages
- name: Verify the Stdlib Version
working-directory: repo
shell: bash
run: |
sleep 1
sbt --no-colors "stdlib-version-updater/run check"
# Prepare distributions # Prepare distributions
- name: Build the Launcher Native Image - name: Build the Launcher Native Image
working-directory: repo working-directory: repo
@ -228,15 +235,16 @@ jobs:
working-directory: repo working-directory: repo
if: runner.os != 'Windows' # TODO [RW] CRLF handling in licenses task if: runner.os != 'Windows' # TODO [RW] CRLF handling in licenses task
shell: bash shell: bash
# We assume that standard library version is the same as engine version.
run: | run: |
sleep 1 sleep 1
sbt "enso/verifyGeneratedPackage engine ${{ env.ENGINE_DIST_DIR }}/THIRD-PARTY" sbt "enso/verifyGeneratedPackage engine ${{ env.ENGINE_DIST_DIR }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage launcher ${{ env.LAUNCHER_DIST_DIR }}/THIRD-PARTY" sbt "enso/verifyGeneratedPackage launcher ${{ env.LAUNCHER_DIST_DIR }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage project-manager ${{ env.PROJECTMANAGER_DIST_DIR }}/THIRD-PARTY" sbt "enso/verifyGeneratedPackage project-manager ${{ env.PROJECTMANAGER_DIST_DIR }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage Base ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Base/0.1.0/THIRD-PARTY" sbt "enso/verifyGeneratedPackage Base ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Base/${{ env.DIST_VERSION }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage Table ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Table/0.1.0/THIRD-PARTY" sbt "enso/verifyGeneratedPackage Table ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Table/${{ env.DIST_VERSION }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage Image ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Image/0.1.0/THIRD-PARTY" sbt "enso/verifyGeneratedPackage Image ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Image/${{ env.DIST_VERSION }}/THIRD-PARTY"
sbt "enso/verifyGeneratedPackage Database ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Database/0.1.0/THIRD-PARTY" sbt "enso/verifyGeneratedPackage Database ${{ env.ENGINE_DIST_DIR }}/lib/Standard/Database/${{ env.DIST_VERSION }}/THIRD-PARTY"
# Publish # Publish
- name: Compress the built artifacts for upload - name: Compress the built artifacts for upload

View File

@ -118,11 +118,17 @@ jobs:
key: ${{ runner.os }}-sbt-${{ hashFiles('**build.sbt') }} key: ${{ runner.os }}-sbt-${{ hashFiles('**build.sbt') }}
restore-keys: ${{ runner.os }}-sbt- restore-keys: ${{ runner.os }}-sbt-
# Compile
- name: Bootstrap Enso project - name: Bootstrap Enso project
run: | run: |
sleep 1 sleep 1
sbt --no-colors bootstrap sbt --no-colors bootstrap
- name: Verify the Stdlib Version
run: |
sleep 1
sbt --no-colors "stdlib-version-updater/run check"
# Compile
- name: Build Enso - name: Build Enso
run: | run: |
sleep 1 sleep 1
@ -288,11 +294,17 @@ jobs:
$ENGINE_DIST_DIR/bin/enso.bat --run test/Image_Tests $ENGINE_DIST_DIR/bin/enso.bat --run test/Image_Tests
# Publish # Publish
- name: Compress the built artifacts for upload
# The artifacts are compressed before upload to work around an error with long path handling in the upload-artifact action on Windows.
# See: https://github.com/actions/upload-artifact/issues/240
shell: bash
working-directory: ${{ env.ENGINE_DIST_ROOT }}
run: 7z a -r ${{ env.ENGINE_DIST_NAME }}.zip *
- name: Publish the Engine Distribution Artifact - name: Publish the Engine Distribution Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: ${{ env.ENGINE_DIST_NAME }} name: ${{ env.ENGINE_DIST_NAME }}
path: ${{ env.ENGINE_DIST_ROOT }} path: ${{ env.ENGINE_DIST_ROOT }}/${{ env.ENGINE_DIST_NAME }}.zip
- name: Publish the Launcher - name: Publish the Launcher
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:

10
.gitignore vendored
View File

@ -118,9 +118,9 @@ build-cache/
## Enso-Specific ## ## Enso-Specific ##
################### ###################
distribution/lib/Standard/Examples/0.1.0/data/scratch_file distribution/lib/Standard/Examples/*/data/scratch_file
distribution/lib/Standard/Examples/0.1.0/data/image.png distribution/lib/Standard/Examples/*/data/image.png
distribution/editions distribution/editions
distribution/lib/Standard/Table/0.1.0/polyglot/ distribution/lib/Standard/Table/*/polyglot/
distribution/lib/Standard/Examples/0.1.0/data/spreadsheet.xls distribution/lib/Standard/Examples/*/data/spreadsheet.xls
distribution/lib/Standard/Examples/0.1.0/data/spreadsheet.xlsx distribution/lib/Standard/Examples/*/data/spreadsheet.xlsx

View File

@ -6,8 +6,9 @@ distribution/launcher/THIRD-PARTY
distribution/engine/THIRD-PARTY distribution/engine/THIRD-PARTY
distribution/project-manager/THIRD-PARTY distribution/project-manager/THIRD-PARTY
tools/legal-review tools/legal-review
distribution/lib/Standard/Base/0.1.0/THIRD-PARTY distribution/lib/Standard/Base/*/THIRD-PARTY
distribution/lib/Standard/Table/0.1.0/THIRD-PARTY distribution/lib/Standard/Table/*/THIRD-PARTY
distribution/lib/Standard/Image/0.1.0/THIRD-PARTY distribution/lib/Standard/Image/*/THIRD-PARTY
distribution/lib/Standard/Database/0.1.0/THIRD-PARTY distribution/lib/Standard/Database/*/THIRD-PARTY
built-distribution/ built-distribution/
THIRD-PARTY

View File

@ -20,7 +20,7 @@ val graalVersion = "21.1.0"
val javaVersion = "11" val javaVersion = "11"
val ensoVersion = "0.2.25-SNAPSHOT" // Note [Engine And Launcher Version] val ensoVersion = "0.2.25-SNAPSHOT" // Note [Engine And Launcher Version]
val currentEdition = "2021.13-SNAPSHOT" // Note [Default Editions] val currentEdition = "2021.13-SNAPSHOT" // Note [Default Editions]
val stdLibVersion = "0.1.0" // Note [Standard Library Version] val stdLibVersion = ensoVersion
/* Note [Engine And Launcher Version] /* Note [Engine And Launcher Version]
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -44,17 +44,6 @@ val stdLibVersion = "0.1.0" // Note [Standard Library Version]
* release. * release.
*/ */
/* Note [Standard Library Version]
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Currently the Standard library version is fixed at 0.1.0.
*
* Once the library repository is up and we start releasing the libraries, this
* version will need to be bumped, so for now the best way to achieve that will
* be to keep it in-sync with the engine version. However this will require
* creating a tool which will bump these version numbers in all standard library
* packages.
*/
ThisBuild / organization := "org.enso" ThisBuild / organization := "org.enso"
ThisBuild / scalaVersion := scalacVersion ThisBuild / scalaVersion := scalacVersion
@ -253,6 +242,7 @@ lazy val enso = (project in file("."))
`edition-uploader`, `edition-uploader`,
`library-manager`, `library-manager`,
`library-manager-test`, `library-manager-test`,
`stdlib-version-updater`,
syntax.jvm, syntax.jvm,
testkit testkit
) )
@ -586,6 +576,7 @@ lazy val `parser-service` = (project in file("lib/scala/parser-service"))
lazy val `docs-generator` = (project in file("lib/scala/docs-generator")) lazy val `docs-generator` = (project in file("lib/scala/docs-generator"))
.dependsOn(syntax.jvm) .dependsOn(syntax.jvm)
.dependsOn(cli) .dependsOn(cli)
.dependsOn(`version-output`)
.configs(Benchmark) .configs(Benchmark)
.settings( .settings(
libraryDependencies ++= Seq( libraryDependencies ++= Seq(
@ -752,7 +743,8 @@ lazy val `version-output` = (project in file("lib/scala/version-output"))
ensoVersion = ensoVersion, ensoVersion = ensoVersion,
scalacVersion = scalacVersion, scalacVersion = scalacVersion,
graalVersion = graalVersion, graalVersion = graalVersion,
currentEdition = currentEdition currentEdition = currentEdition,
stdLibVersion = stdLibVersion
) )
}.taskValue }.taskValue
) )
@ -1357,8 +1349,7 @@ lazy val editions = project
Editions.writeEditionConfig( Editions.writeEditionConfig(
ensoVersion = ensoVersion, ensoVersion = ensoVersion,
editionName = currentEdition, editionName = currentEdition,
libraryVersion = libraryVersion = stdLibVersion,
"0.1.0", // TODO [RW] Once we start releasing the standard libraries, this will be synced with engine version.
log = streams.value.log log = streams.value.log
) )
} }
@ -1433,6 +1424,13 @@ lazy val `library-manager-test` = project
.dependsOn(testkit) .dependsOn(testkit)
.dependsOn(`logging-service`) .dependsOn(`logging-service`)
lazy val `stdlib-version-updater` = project
.in(file("lib/scala/stdlib-version-updater"))
.configs(Test)
.dependsOn(`version-output`)
.dependsOn(pkg)
.dependsOn(cli)
lazy val `runtime-version-manager` = project lazy val `runtime-version-manager` = project
.in(file("lib/scala/runtime-version-manager")) .in(file("lib/scala/runtime-version-manager"))
.configs(Test) .configs(Test)
@ -1639,7 +1637,8 @@ buildEngineDistribution := {
distributionRoot = root, distributionRoot = root,
cacheFactory = cacheFactory, cacheFactory = cacheFactory,
graalVersion = graalVersion, graalVersion = graalVersion,
javaVersion = javaVersion javaVersion = javaVersion,
stdlibVersion = stdLibVersion
) )
log.info(s"Engine package created at $root") log.info(s"Engine package created at $root")
} }

View File

@ -1,7 +0,0 @@
license: APLv2
name: Base
namespace: Standard
enso-version: default
version: "0.1.0"
author: "Enso Team <contact@enso.org>"
maintainer: "Enso Team <contact@enso.org>"

View File

@ -0,0 +1,10 @@
name: Base
namespace: Standard
version: 0.2.25-SNAPSHOT
license: APLv2
authors:
- name: Enso Team
email: contact@enso.org
maintainers:
- name: Enso Team
email: contact@enso.org

View File

@ -1,7 +0,0 @@
license: APLv2
name: Database
namespace: Standard
enso-version: default
version: "0.1.0"
author: "Enso Team <contact@enso.org>"
maintainer: "Enso Team <contact@enso.org>"

View File

@ -0,0 +1,10 @@
name: Database
namespace: Standard
version: 0.2.25-SNAPSHOT
license: APLv2
authors:
- name: Enso Team
email: contact@enso.org
maintainers:
- name: Enso Team
email: contact@enso.org

View File

@ -1,7 +0,0 @@
license: APLv2
name: Examples
namespace: Standard
enso-version: default
version: "0.1.0"
author: "Enso Team <contact@enso.org>"
maintainer: "Enso Team <contact@enso.org>"

View File

@ -0,0 +1,10 @@
name: Examples
namespace: Standard
version: 0.2.25-SNAPSHOT
license: APLv2
authors:
- name: Enso Team
email: contact@enso.org
maintainers:
- name: Enso Team
email: contact@enso.org

View File

@ -40,7 +40,7 @@ csv_path = here.csv.path
Calling this method will result in the spreadsheet file being downloaded Calling this method will result in the spreadsheet file being downloaded
from the internet if it is not already present on your disk. If you do not from the internet if it is not already present on your disk. If you do not
want this to happen, please place the spreadsheet in the want this to happen, please place the spreadsheet in the
`lib/Standard/Examples/0.1.0/data` folder for your Enso distribution. `lib/Standard/Examples/<version>/data` folder for your Enso distribution.
xls : File xls : File
xls = xls =
url = "https://enso-data-samples.s3.us-west-1.amazonaws.com/spreadsheet.xls" url = "https://enso-data-samples.s3.us-west-1.amazonaws.com/spreadsheet.xls"
@ -55,7 +55,7 @@ xls =
Calling this method will result in the spreadsheet file being downloaded Calling this method will result in the spreadsheet file being downloaded
from the internet if it is not already present on your disk. If you do not from the internet if it is not already present on your disk. If you do not
want this to happen, please place the spreadsheet in the want this to happen, please place the spreadsheet in the
`lib/Standard/Examples/0.1.0/data` folder for your Enso distribution. `lib/Standard/Examples/<version>/data` folder for your Enso distribution.
xlsx : File xlsx : File
xlsx = xlsx =
url = "https://enso-data-samples.s3.us-west-1.amazonaws.com/spreadsheet.xlsx" url = "https://enso-data-samples.s3.us-west-1.amazonaws.com/spreadsheet.xlsx"
@ -171,7 +171,7 @@ uri = Enso_Uri.parse "http://user:pass@example.com/foo/bar?key=val"
Calling this method will result in the image file being downloaded from Calling this method will result in the image file being downloaded from
the internet if it is not already present on your disk. If you do not want the internet if it is not already present on your disk. If you do not want
this to happen, please place the image in the this to happen, please place the image in the
`lib/Standard/Examples/0.1.0/data` folder for your Enso distribution. `lib/Standard/Examples/<version>/data` folder for your Enso distribution.
image_file : File image_file : File
image_file = image_file =
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Hue_alpha_falloff.png/320px-Hue_alpha_falloff.png" url = "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Hue_alpha_falloff.png/320px-Hue_alpha_falloff.png"
@ -186,7 +186,7 @@ image_file =
Calling this method will result in the image file being downloaded from Calling this method will result in the image file being downloaded from
the internet if it is not already present on your disk. If you do not want the internet if it is not already present on your disk. If you do not want
this to happen, please place the image in the this to happen, please place the image in the
`lib/Standard/Examples/0.1.0/data` folder for your Enso distribution. `lib/Standard/Examples/<version>/data` folder for your Enso distribution.
image : Enso_Image.Image image : Enso_Image.Image
image = Enso_Image.read here.image_file [Codecs.Read_Alpha_Channel] image = Enso_Image.read here.image_file [Codecs.Read_Alpha_Channel]

View File

@ -1,7 +0,0 @@
license: APLv2
name: Geo
namespace: Standard
enso-version: default
version: "0.1.0"
author: "Enso Team <contact@enso.org>"
maintainer: "Enso Team <contact@enso.org>"

View File

@ -0,0 +1,10 @@
name: Geo
namespace: Standard
version: 0.2.25-SNAPSHOT
license: APLv2
authors:
- name: Enso Team
email: contact@enso.org
maintainers:
- name: Enso Team
email: contact@enso.org

View File

@ -1,7 +0,0 @@
license: APLv2
name: Image
namespace: Standard
enso-version: default
version: "0.1.0"
author: "Enso Team <contact@enso.org>"
maintainer: "Enso Team <contact@enso.org>"

View File

@ -0,0 +1,10 @@
name: Image
namespace: Standard
version: 0.2.25-SNAPSHOT
license: APLv2
authors:
- name: Enso Team
email: contact@enso.org
maintainers:
- name: Enso Team
email: contact@enso.org

Some files were not shown because too many files have changed in this diff Show More